feat(mflux_image_edit): pass ALL inputs to --image-paths — multi-image compose

Qwen-Image-Edit takes up to ~3 images ('put the shirt from image 2 on the
person in image 1'); the operator only ever forwarded input[0]. Single-image
jobs unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
type-two 2026-07-20 18:33:19 +10:00
parent 3b8c88ce48
commit 61c63e513e
2 changed files with 35 additions and 9 deletions

View File

@ -2,19 +2,43 @@
"id": "mflux_image_edit",
"name": "Edit Image (local, Qwen)",
"category": "image-prep",
"description": "Image + instruction → edited image entirely on this Mac via mflux Qwen-Image-Edit (ungated/Apache-2.0). Free local alternative to fal_image_edit / nano-banana edit — 'remove the sticker', 'make it studio-lit on white', material/lighting changes. First run downloads weights.",
"accepts": ["image"],
"produces": ["image"],
"description": "1-3 images + instruction \u2192 edited image (multi-image composes: 'put the shirt from image 2 on the person in image 1') entirely on this Mac via mflux Qwen-Image-Edit (ungated/Apache-2.0). Free local alternative to fal_image_edit / nano-banana edit \u2014 'remove the sticker', 'make it studio-lit on white', material/lighting changes. First run downloads weights.",
"accepts": [
"image"
],
"produces": [
"image"
],
"resources": "gpu",
"entry": "run.py",
"python": "venvs/mflux/bin/python",
"params_schema": {
"type": "object",
"properties": {
"prompt": {"type": "string", "default": "", "description": "Edit instruction (what to change)"},
"steps": {"type": "integer", "default": 25, "minimum": 1, "maximum": 50, "description": "Inference steps"},
"seed": {"type": "integer", "default": 42, "description": "Random seed"},
"guidance": {"type": "number", "default": 4.0, "minimum": 0, "maximum": 10, "description": "Guidance scale"}
"prompt": {
"type": "string",
"default": "",
"description": "Edit instruction (what to change)"
},
"steps": {
"type": "integer",
"default": 25,
"minimum": 1,
"maximum": 50,
"description": "Inference steps"
},
"seed": {
"type": "integer",
"default": 42,
"description": "Random seed"
},
"guidance": {
"type": "number",
"default": 4.0,
"minimum": 0,
"maximum": 10,
"description": "Guidance scale"
}
}
}
}
}

View File

@ -25,7 +25,9 @@ if not cli.exists():
src = Path(a.input[0])
outdir = Path(a.outdir)
out = outdir / f"{src.stem}_edited.png"
cmd = [str(cli), "--image-paths", str(src.resolve()),
# ALL inputs go to Qwen (it composes up to ~3 images: "put the shirt from image 2 on the person
# in image 1"). Single-image jobs behave exactly as before.
cmd = [str(cli), "--image-paths", *[str(Path(x).resolve()) for x in a.input],
"--prompt", p["prompt"],
"--steps", str(p.get("steps", 25)),
"--seed", str(p.get("seed", 42)),