mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-14 12:56:33 +00:00
Merge branch 'master' into wan
This commit is contained in:
commit
b05b2b29a3
13 files changed
+167
-8
No files matched your search
@@ -103,6 +103,8 @@ struct SDParams {
|
||||
bool clip_on_cpu = false;
|
||||
bool vae_on_cpu = false;
|
||||
bool diffusion_flash_attn = false;
|
||||
bool diffusion_conv_direct = false;
|
||||
bool vae_conv_direct = false;
|
||||
bool canny_preprocess = false;
|
||||
bool color = false;
|
||||
int upscale_repeats = 1;
|
||||
@@ -153,6 +155,8 @@ void print_params(SDParams params) {
|
||||
printf(" control_net_cpu: %s\n", params.control_net_cpu ? "true" : "false");
|
||||
printf(" vae decoder on cpu:%s\n", params.vae_on_cpu ? "true" : "false");
|
||||
printf(" diffusion flash attention:%s\n", params.diffusion_flash_attn ? "true" : "false");
|
||||
printf(" diffusion Conv2d direct:%s\n", params.diffusion_conv_direct ? "true" : "false");
|
||||
printf(" vae Conv2d direct:%s\n", params.vae_conv_direct ? "true" : "false");
|
||||
printf(" strength(control): %.2f\n", params.control_strength);
|
||||
printf(" prompt: %s\n", params.prompt.c_str());
|
||||
printf(" negative_prompt: %s\n", params.negative_prompt.c_str());
|
||||
@@ -255,6 +259,10 @@ void print_usage(int argc, const char* argv[]) {
|
||||
printf(" --diffusion-fa use flash attention in the diffusion model (for low vram)\n");
|
||||
printf(" Might lower quality, since it implies converting k and v to f16.\n");
|
||||
printf(" This might crash if it is not supported by the backend.\n");
|
||||
printf(" --diffusion-conv-direct use Conv2d direct in the diffusion model");
|
||||
printf(" This might crash if it is not supported by the backend.\n");
|
||||
printf(" --vae-conv-direct use Conv2d direct in the vae model (should improve the performance)");
|
||||
printf(" This might crash if it is not supported by the backend.\n");
|
||||
printf(" --control-net-cpu keep controlnet in cpu (for low vram)\n");
|
||||
printf(" --canny apply canny preprocessor (edge detection)\n");
|
||||
printf(" --color colors the logging tags according to level\n");
|
||||
@@ -495,6 +503,8 @@ void parse_args(int argc, const char** argv, SDParams& params) {
|
||||
{"", "--clip-on-cpu", "", true, ¶ms.clip_on_cpu},
|
||||
{"", "--vae-on-cpu", "", true, ¶ms.vae_on_cpu},
|
||||
{"", "--diffusion-fa", "", true, ¶ms.diffusion_flash_attn},
|
||||
{"", "--diffusion-conv-direct", "", true, ¶ms.diffusion_conv_direct},
|
||||
{"", "--vae-conv-direct", "", true, ¶ms.vae_conv_direct},
|
||||
{"", "--canny", "", true, ¶ms.canny_preprocess},
|
||||
{"-v", "--verbos", "", true, ¶ms.verbose},
|
||||
{"", "--color", "", true, ¶ms.color},
|
||||
@@ -1077,6 +1087,8 @@ int main(int argc, const char* argv[]) {
|
||||
params.control_net_cpu,
|
||||
params.vae_on_cpu,
|
||||
params.diffusion_flash_attn,
|
||||
params.diffusion_conv_direct,
|
||||
params.vae_conv_direct,
|
||||
params.chroma_use_dit_mask,
|
||||
params.chroma_use_t5_mask,
|
||||
params.chroma_t5_mask_pad,
|
||||
@@ -1184,6 +1196,7 @@ int main(int argc, const char* argv[]) {
|
||||
if (params.esrgan_path.size() > 0 && params.upscale_repeats > 0) {
|
||||
upscaler_ctx_t* upscaler_ctx = new_upscaler_ctx(params.esrgan_path.c_str(),
|
||||
params.offload_params_to_cpu,
|
||||
params.diffusion_conv_direct,
|
||||
params.n_threads);
|
||||
|
||||
if (upscaler_ctx == NULL) {
|
||||
|
||||
Reference in new issue
Block a user