- Notifications
You must be signed in to change notification settings - Fork 736
chore: improve ci#150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
chore: improve ci #150
Changes from all commits
82d842769de7677e62386aec9030633311ccf378e8bd5673434deced7116f2299cb442b9400ec81175cdf531eb3e3632c3346416bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -28,7 +28,8 @@ option(SD_CUBLAS "sd: cuda backend" OFF) | ||
| option(SD_HIPBLAS "sd: rocm backend" OFF) | ||
| option(SD_METAL "sd: metal backend" OFF) | ||
| option(SD_FLASH_ATTN "sd: use flash attention for x4 less memory usage" OFF) | ||
| option(BUILD_SHARED_LIBS "sd: build shared libs" OFF) | ||
| option(SD_FAST_SOFTMAX "sd: x1.5 faster softmax, indeterministic (sometimes, same seed don't generate same image), cuda only" OFF) | ||
| option(SD_BUILD_SHARED_LIBS "sd: build shared libs" OFF) | ||
| #option(SD_BUILD_SERVER "sd: build server example" ON) | ||
| if(SD_CUBLAS) | ||
| @@ -59,17 +60,24 @@ endif() | ||
| set(SD_LIB stable-diffusion) | ||
| add_library(${SD_LIB} stable-diffusion.h stable-diffusion.cpp model.h model.cpp util.h util.cpp upscaler.cpp | ||
| ggml_extend.hpp clip.hpp common.hpp unet.hpp tae.hpp esrgan.hpp lora.hpp denoiser.hpp rng.hpp rng_philox.hpp | ||
| control.hpp preprocessing.hpp) | ||
| file(GLOB SD_LIB_SOURCES | ||
| "*.h" | ||
| "*.cpp" | ||
| "*.hpp" | ||
| ) | ||
| if(BUILD_SHARED_LIBS) | ||
| # we can get only one share lib | ||
| if(SD_BUILD_SHARED_LIBS) | ||
| message("Build shared library") | ||
| set(BUILD_SHARED_LIBS OFF) | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this looks very counter intuitive. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hahaha, but this is the key to packaging all the code into a dynamic library, which will help me perform black magic in golang. | ||
| message(${SD_LIB_SOURCES}) | ||
| add_library(${SD_LIB} SHARED ${SD_LIB_SOURCES}) | ||
| add_definitions(-DSD_BUILD_SHARED_LIB) | ||
| target_compile_definitions(${SD_LIB} PRIVATE -DSD_BUILD_DLL) | ||
| set(CMAKE_POSITION_INDEPENDENT_CODE ON) | ||
| else() | ||
| message("Build static library") | ||
| add_library(${SD_LIB} STATIC ${SD_LIB_SOURCES}) | ||
| endif() | ||
Uh oh!
There was an error while loading. Please reload this page.