[Feat] image2image for Z-Image (#1580)

Signed-off-by: Lancer <maruixiang6688@gmail.com>
Signed-off-by: Lancer <402430575@qq.com>
This commit is contained in:
Lancer authored and GitHub committed 2026-04-08 14:41:24 +08:00
1 parent 1cd5210440
commit 8609bc8ed9
5 files changed
+185 -29

No files matched your search

@@ -1421,6 +1421,7 @@ async def edit_images(
negative_prompt: str | None = Form(None),
num_inference_steps: int | None = Form(None),
guidance_scale: float | None = Form(None),
strength: float | None = Form(None),
true_cfg_scale: float | None = Form(None),
seed: int | None = Form(None),
generator_device: str | None = Form(None),
@@ -1551,6 +1552,7 @@ async def edit_images(
# 3.4 Add optional parameters ONLY if provided
_update_if_not_none(gen_params, "num_inference_steps", num_inference_steps)
_update_if_not_none(gen_params, "guidance_scale", guidance_scale)
_update_if_not_none(gen_params, "strength", strength)
_update_if_not_none(gen_params, "true_cfg_scale", true_cfg_scale)
# If seed is not provided, generate a random one to ensure
# a proper generator is initialized in the backend.