Skip to content
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

Updated to 78ad76f #1

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/sd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(${CMAKE_VERSION} VERSION_LESS 3.14)
include(add_FetchContent_MakeAvailable.cmake)
endif()

set(SD_GIT_TAG 0e64238e4c4c902e0c043b741ae48fe22a2fd0fa)
set(SD_GIT_TAG 78ad76f3f49a15692a550e6f73ad3a5765ffdb25)
set(SD_GIT_URL https://github.com/leejet/stable-diffusion.cpp)
set(BUILD_SHARED_LIBS OFF)

Expand Down
10 changes: 8 additions & 2 deletions stable-diffusion-abi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ struct stable_diffusion_ctx* stable_diffusion_init(
const int n_threads,
const bool vae_decode_only,
const char * taesd_path,
const char * esrgan_path,
const bool free_params_immediately,
const bool vae_tiling,
const char* lora_model_dir,
const char* rng_type
) {
Expand All @@ -153,7 +155,9 @@ struct stable_diffusion_ctx* stable_diffusion_init(
n_threads,
vae_decode_only,
std::string(taesd_path),
std::string(esrgan_path),
free_params_immediately,
vae_tiling,
std::string(lora_model_dir),
it->second
);
Expand All @@ -168,7 +172,8 @@ bool stable_diffusion_load_from_file(
const char* file_path,
const char* vae_path,
const char* wtype,
const char* schedule
const char* schedule,
const int clip_skip
) {
auto e_wtype=ggmlTypeMap.find(std::string(wtype));
if (e_wtype!=ggmlTypeMap.end()){
Expand All @@ -181,7 +186,8 @@ bool stable_diffusion_load_from_file(
std::string(file_path),
std::string(vae_path),
e_wtype->second ,
e_schedule->second
e_schedule->second,
clip_skip
);
}
return false;
Expand Down
6 changes: 4 additions & 2 deletions stable-diffusion-abi.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,20 @@ STABLE_DIFFUSION_API stable_diffusion_ctx* stable_diffusion_init(
int n_threads,
bool vae_decode_only,
const char *taesd_path,
const char *esrgan_path,
bool free_params_immediately,
bool vae_tiling,
const char* lora_model_dir,
const char* rng_type
);


STABLE_DIFFUSION_API bool stable_diffusion_load_from_file(
const struct stable_diffusion_ctx* ctx,
const char* file_path,
const char* vae_path,
const char* wtype,
const char* schedule
const char* schedule,
int clip_skip
);

STABLE_DIFFUSION_API const uint8_t* stable_diffusion_predict_image(
Expand Down
Loading