diff --git a/server/operators/mflux_image_edit/manifest.json b/server/operators/mflux_image_edit/manifest.json index 918ebde..71d6d8a 100644 --- a/server/operators/mflux_image_edit/manifest.json +++ b/server/operators/mflux_image_edit/manifest.json @@ -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" + } } } -} +} \ No newline at end of file diff --git a/server/operators/mflux_image_edit/run.py b/server/operators/mflux_image_edit/run.py index db54f62..c020cac 100644 --- a/server/operators/mflux_image_edit/run.py +++ b/server/operators/mflux_image_edit/run.py @@ -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)),