Skip to content

Commit

Permalink
Merge pull request #1 from DarthAffe/main
Browse files Browse the repository at this point in the history
Updated to 78ad76f
  • Loading branch information
Cyberhan123 committed Dec 31, 2023
2 parents eefcc62 + b518ce7 commit e3bf233
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
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

0 comments on commit e3bf233

Please sign in to comment.