mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2025-12-13 05:48:56 +00:00
add --vace-strength option
This commit is contained in:
parent
4b9bf2b513
commit
53aeb555bd
@ -92,9 +92,9 @@ struct SDParams {
|
|||||||
sd_sample_params_t high_noise_sample_params;
|
sd_sample_params_t high_noise_sample_params;
|
||||||
|
|
||||||
float moe_boundary = 0.875f;
|
float moe_boundary = 0.875f;
|
||||||
|
|
||||||
int video_frames = 1;
|
int video_frames = 1;
|
||||||
int fps = 16;
|
int fps = 16;
|
||||||
|
float vace_strength = 1.f;
|
||||||
|
|
||||||
float strength = 0.75f;
|
float strength = 0.75f;
|
||||||
float control_strength = 0.9f;
|
float control_strength = 0.9f;
|
||||||
@ -186,6 +186,7 @@ void print_params(SDParams params) {
|
|||||||
printf(" chroma_use_t5_mask: %s\n", params.chroma_use_t5_mask ? "true" : "false");
|
printf(" chroma_use_t5_mask: %s\n", params.chroma_use_t5_mask ? "true" : "false");
|
||||||
printf(" chroma_t5_mask_pad: %d\n", params.chroma_t5_mask_pad);
|
printf(" chroma_t5_mask_pad: %d\n", params.chroma_t5_mask_pad);
|
||||||
printf(" video_frames: %d\n", params.video_frames);
|
printf(" video_frames: %d\n", params.video_frames);
|
||||||
|
printf(" vace_strength: %.2f\n", params.vace_strength);
|
||||||
printf(" fps: %d\n", params.fps);
|
printf(" fps: %d\n", params.fps);
|
||||||
free(sample_params_str);
|
free(sample_params_str);
|
||||||
free(high_noise_sample_params_str);
|
free(high_noise_sample_params_str);
|
||||||
@ -288,6 +289,7 @@ void print_usage(int argc, const char* argv[]) {
|
|||||||
printf(" --moe-boundary BOUNDARY timestep boundary for Wan2.2 MoE model. (default: 0.875)\n");
|
printf(" --moe-boundary BOUNDARY timestep boundary for Wan2.2 MoE model. (default: 0.875)\n");
|
||||||
printf(" only enabled if `--high-noise-steps` is set to -1\n");
|
printf(" only enabled if `--high-noise-steps` is set to -1\n");
|
||||||
printf(" --flow-shift SHIFT shift value for Flow models like SD3.x or WAN (default: auto)\n");
|
printf(" --flow-shift SHIFT shift value for Flow models like SD3.x or WAN (default: auto)\n");
|
||||||
|
printf(" --vace-strength wan vace strength\n");
|
||||||
printf(" -v, --verbose print extra info\n");
|
printf(" -v, --verbose print extra info\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -523,6 +525,7 @@ void parse_args(int argc, const char** argv, SDParams& params) {
|
|||||||
{"", "--control-strength", "", ¶ms.control_strength},
|
{"", "--control-strength", "", ¶ms.control_strength},
|
||||||
{"", "--moe-boundary", "", ¶ms.moe_boundary},
|
{"", "--moe-boundary", "", ¶ms.moe_boundary},
|
||||||
{"", "--flow-shift", "", ¶ms.flow_shift},
|
{"", "--flow-shift", "", ¶ms.flow_shift},
|
||||||
|
{"", "--vace-strength", "", ¶ms.vace_strength},
|
||||||
};
|
};
|
||||||
|
|
||||||
options.bool_options = {
|
options.bool_options = {
|
||||||
@ -1244,6 +1247,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
params.strength,
|
params.strength,
|
||||||
params.seed,
|
params.seed,
|
||||||
params.video_frames,
|
params.video_frames,
|
||||||
|
params.vace_strength,
|
||||||
};
|
};
|
||||||
|
|
||||||
results = generate_video(sd_ctx, &vid_gen_params, &num_results);
|
results = generate_video(sd_ctx, &vid_gen_params, &num_results);
|
||||||
|
|||||||
@ -1728,6 +1728,7 @@ void sd_vid_gen_params_init(sd_vid_gen_params_t* sd_vid_gen_params) {
|
|||||||
sd_vid_gen_params->seed = -1;
|
sd_vid_gen_params->seed = -1;
|
||||||
sd_vid_gen_params->video_frames = 6;
|
sd_vid_gen_params->video_frames = 6;
|
||||||
sd_vid_gen_params->moe_boundary = 0.875f;
|
sd_vid_gen_params->moe_boundary = 0.875f;
|
||||||
|
sd_vid_gen_params->vace_strength = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct sd_ctx_t {
|
struct sd_ctx_t {
|
||||||
@ -2644,7 +2645,8 @@ SD_API sd_image_t* generate_video(sd_ctx_t* sd_ctx, const sd_vid_gen_params_t* s
|
|||||||
{},
|
{},
|
||||||
false,
|
false,
|
||||||
denoise_mask,
|
denoise_mask,
|
||||||
vace_context);
|
vace_context,
|
||||||
|
sd_vid_gen_params->vace_strength);
|
||||||
|
|
||||||
int64_t sampling_end = ggml_time_ms();
|
int64_t sampling_end = ggml_time_ms();
|
||||||
LOG_INFO("sampling(high noise) completed, taking %.2fs", (sampling_end - sampling_start) * 1.0f / 1000);
|
LOG_INFO("sampling(high noise) completed, taking %.2fs", (sampling_end - sampling_start) * 1.0f / 1000);
|
||||||
@ -2678,7 +2680,8 @@ SD_API sd_image_t* generate_video(sd_ctx_t* sd_ctx, const sd_vid_gen_params_t* s
|
|||||||
{},
|
{},
|
||||||
false,
|
false,
|
||||||
denoise_mask,
|
denoise_mask,
|
||||||
vace_context);
|
vace_context,
|
||||||
|
sd_vid_gen_params->vace_strength);
|
||||||
|
|
||||||
int64_t sampling_end = ggml_time_ms();
|
int64_t sampling_end = ggml_time_ms();
|
||||||
LOG_INFO("sampling completed, taking %.2fs", (sampling_end - sampling_start) * 1.0f / 1000);
|
LOG_INFO("sampling completed, taking %.2fs", (sampling_end - sampling_start) * 1.0f / 1000);
|
||||||
|
|||||||
@ -211,6 +211,7 @@ typedef struct {
|
|||||||
float strength;
|
float strength;
|
||||||
int64_t seed;
|
int64_t seed;
|
||||||
int video_frames;
|
int video_frames;
|
||||||
|
float vace_strength;
|
||||||
} sd_vid_gen_params_t;
|
} sd_vid_gen_params_t;
|
||||||
|
|
||||||
typedef struct sd_ctx_t sd_ctx_t;
|
typedef struct sd_ctx_t sd_ctx_t;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user