feat: add LoRA support

This commit is contained in:
leejet committed 2023-11-19 17:43:49 +08:00
1 parent 536f3af672
commit 9a9f3daf8e
7 files changed
+573 -36

No files matched your search

+5 -4
View File
@@ -45,11 +45,12 @@ class StableDiffusion {
StableDiffusion(int n_threads = -1,
bool vae_decode_only = false,
bool free_params_immediately = false,
std::string lora_model_dir = "",
RNGType rng_type = STD_DEFAULT_RNG);
bool load_from_file(const std::string& file_path, Schedule d = DEFAULT);
std::vector<uint8_t> txt2img(
const std::string& prompt,
const std::string& negative_prompt,
std::string prompt,
std::string negative_prompt,
float cfg_scale,
int width,
int height,
@@ -58,8 +59,8 @@ class StableDiffusion {
int64_t seed);
std::vector<uint8_t> img2img(
const std::vector<uint8_t>& init_img,
const std::string& prompt,
const std::string& negative_prompt,
std::string prompt,
std::string negative_prompt,
float cfg_scale,
int width,
int height,