diff --git a/README.md b/README.md index 41c7ba681..62b597911 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,6 @@ arguments: --pm-id-images-dir [DIR] path to PHOTOMAKER input id images dir --pm-id-embed-path [PATH] path to PHOTOMAKER v2 id embed --pm-style-strength strength for keeping PHOTOMAKER input identity (default: 20) - --normalize-input normalize PHOTOMAKER input id images -v, --verbose print extra info ``` diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index 274a25a17..02f4767b9 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -103,7 +103,6 @@ struct SDParams { bool verbose = false; bool offload_params_to_cpu = false; bool control_net_cpu = false; - bool normalize_input = false; bool clip_on_cpu = false; bool vae_on_cpu = false; bool diffusion_flash_attn = false; @@ -156,7 +155,6 @@ void print_params(SDParams params) { printf(" pm_id_images_dir: %s\n", params.pm_id_images_dir.c_str()); printf(" pm_id_embed_path: %s\n", params.pm_id_embed_path.c_str()); printf(" pm_style_strength: %.2f\n", params.pm_style_strength); - printf(" normalize input image: %s\n", params.normalize_input ? "true" : "false"); printf(" output_path: %s\n", params.output_path.c_str()); printf(" init_image_path: %s\n", params.init_image_path.c_str()); printf(" end_image_path: %s\n", params.end_image_path.c_str()); @@ -306,7 +304,6 @@ void print_usage(int argc, const char* argv[]) { printf(" --pm-id-images-dir [DIR] path to PHOTOMAKER input id images dir\n"); printf(" --pm-id-embed-path [PATH] path to PHOTOMAKER v2 id embed\n"); printf(" --pm-style-strength strength for keeping PHOTOMAKER input identity (default: 20)\n"); - printf(" --normalize-input normalize PHOTOMAKER input id images\n"); printf(" -v, --verbose print extra info\n"); } @@ -552,7 +549,6 @@ void parse_args(int argc, const char** argv, SDParams& params) { {"", "--vae-tiling", "", true, ¶ms.vae_tiling_params.enabled}, {"", "--offload-to-cpu", "", true, ¶ms.offload_params_to_cpu}, {"", "--control-net-cpu", "", true, ¶ms.control_net_cpu}, - {"", "--normalize-input", "", true, ¶ms.normalize_input}, {"", "--clip-on-cpu", "", true, ¶ms.clip_on_cpu}, {"", "--vae-on-cpu", "", true, ¶ms.vae_on_cpu}, {"", "--diffusion-fa", "", true, ¶ms.diffusion_flash_attn}, @@ -1379,7 +1375,6 @@ int main(int argc, const char* argv[]) { params.batch_count, control_image, params.control_strength, - params.normalize_input, { pmid_images.data(), (int)pmid_images.size(), diff --git a/stable-diffusion.cpp b/stable-diffusion.cpp index c35268b57..67d344379 100644 --- a/stable-diffusion.cpp +++ b/stable-diffusion.cpp @@ -748,15 +748,15 @@ class StableDiffusionGGML { denoiser->scheduler->version = version; break; case SGM_UNIFORM: - LOG_INFO("Running with SGM Uniform schedule"); - denoiser->scheduler = std::make_shared(); - denoiser->scheduler->version = version; - break; + LOG_INFO("Running with SGM Uniform schedule"); + denoiser->scheduler = std::make_shared(); + denoiser->scheduler->version = version; + break; case SIMPLE: - LOG_INFO("Running with Simple schedule"); - denoiser->scheduler = std::make_shared(); - denoiser->scheduler->version = version; - break; + LOG_INFO("Running with Simple schedule"); + denoiser->scheduler = std::make_shared(); + denoiser->scheduler->version = version; + break; case SMOOTHSTEP: LOG_INFO("Running with SmoothStep scheduler"); denoiser->scheduler = std::make_shared(); @@ -1053,7 +1053,7 @@ class StableDiffusionGGML { ggml_tensor* denoise_mask = NULL, ggml_tensor* vace_context = NULL, float vace_strength = 1.f) { - if (shifted_timestep > 0 && !sd_version_is_sdxl(version)) { + if (shifted_timestep > 0 && !sd_version_is_sdxl(version)) { LOG_WARN("timestep shifting is only supported for SDXL models!"); shifted_timestep = 0; } @@ -1127,7 +1127,7 @@ class StableDiffusionGGML { } else { timesteps_vec.assign(1, t); } - + timesteps_vec = process_timesteps(timesteps_vec, init_latent, denoise_mask); auto timesteps = vector_to_ggml_tensor(work_ctx, timesteps_vec); std::vector guidance_vec(1, guidance.distilled_guidance); @@ -1790,7 +1790,6 @@ void sd_img_gen_params_init(sd_img_gen_params_t* sd_img_gen_params) { sd_img_gen_params->seed = -1; sd_img_gen_params->batch_count = 1; sd_img_gen_params->control_strength = 0.9f; - sd_img_gen_params->normalize_input = false; sd_img_gen_params->pm_params = {nullptr, 0, nullptr, 20.f}; sd_img_gen_params->vae_tiling_params = {false, 0, 0, 0.5f, 0.0f, 0.0f}; } @@ -1816,7 +1815,6 @@ char* sd_img_gen_params_to_str(const sd_img_gen_params_t* sd_img_gen_params) { "ref_images_count: %d\n" "increase_ref_index: %s\n" "control_strength: %.2f\n" - "normalize_input: %s\n" "photo maker: {style_strength = %.2f, id_images_count = %d, id_embed_path = %s}\n" "VAE tiling: %s\n", SAFE_STR(sd_img_gen_params->prompt), @@ -1831,7 +1829,6 @@ char* sd_img_gen_params_to_str(const sd_img_gen_params_t* sd_img_gen_params) { sd_img_gen_params->ref_images_count, BOOL_STR(sd_img_gen_params->increase_ref_index), sd_img_gen_params->control_strength, - BOOL_STR(sd_img_gen_params->normalize_input), sd_img_gen_params->pm_params.style_strength, sd_img_gen_params->pm_params.id_images_count, SAFE_STR(sd_img_gen_params->pm_params.id_embed_path), @@ -1915,7 +1912,6 @@ sd_image_t* generate_image_internal(sd_ctx_t* sd_ctx, int batch_count, sd_image_t control_image, float control_strength, - bool normalize_input, sd_pm_params_t pm_params, std::vector ref_latents, bool increase_ref_index, @@ -2448,7 +2444,6 @@ sd_image_t* generate_image(sd_ctx_t* sd_ctx, const sd_img_gen_params_t* sd_img_g sd_img_gen_params->batch_count, sd_img_gen_params->control_image, sd_img_gen_params->control_strength, - sd_img_gen_params->normalize_input, sd_img_gen_params->pm_params, ref_latents, sd_img_gen_params->increase_ref_index, diff --git a/stable-diffusion.h b/stable-diffusion.h index 80f1f6e72..7efbce5f9 100644 --- a/stable-diffusion.h +++ b/stable-diffusion.h @@ -212,7 +212,6 @@ typedef struct { int batch_count; sd_image_t control_image; float control_strength; - bool normalize_input; sd_pm_params_t pm_params; sd_tiling_params_t vae_tiling_params; } sd_img_gen_params_t;