Modify Image
Edit an image with a sentence — 'turn the flowers into sunflowers'
- client
- modify_image_ref
- image_url
- generation_id
- image
LumaModifyImage ("Modify Image") is the instruction-edit node of this pack: give it an image and a sentence, and it returns the image changed the way you asked. The example workflow spells it out plainly - "transform all the flowers to sunflowers" - and that's the whole pattern. It's Luma's hosted answer to what the local community does with Qwen-Image-Edit and the Flux Kontext family: the edit model re-emits the frame guided by your instruction while trying to preserve everything else.
If you've read the KB's character-consistency essay, you know instruction editing became the 2026 default for "keep this character but change the scene" precisely because the model never re-invents the identity from scratch - it looks at your image while it works. This node is that idea as a hosted API call, with the tradeoffs baked in: it runs on Luma's servers (paid, credit-based) instead of your GPU, and the mechanism is the same "re-emit the whole frame" approach, so pixels you didn't mention can drift.
How it works
The inputs are just four: client (from a LumaAIClient), model (photon-1 / photon-flash-1), prompt (the instruction, force-input so wire it from a text node), and modify_image_ref - a REFERENCE object from the pack's Reference node. That last one is the whole trick: you don't pass an image tensor, you pass a Reference built from an image URL with a weight. The example workflow uses a weight of 0.5, and that matters - the weight tells the API how hard to stay anchored to the original image versus how freely to follow your instruction. Too high and the edit is timid; too low and it redraws the whole picture.
Outputs mirror LumaImageGeneration: image_url, generation_id, and a local image tensor you can preview or feed into local nodes. The result always saves to the outputs folder as a .jpg.
What to set
prompt- write it as an instruction, present tense: "make the sky stormy", "change the shirt to leather". The same mental model as instructing Qwen-Edit.modify_image_refweight - 0.5 is a sensible starting point. For light tweaks that keep the composition almost identical, go higher; for bold rewrites, lower.model-photon-1for quality edits,photon-flash-1to prototype cheaply.
Installing
Pack standard: ComfyUI Manager → search "ComfyUI-LumaAI-API", or clone into ComfyUI/custom_nodes and install requirements.txt. Light deps (lumaai, requests, numpy, Pillow), no local models, and a LumaAIClient with your key supplies client.
Common issues
- Image needs a hosted URL first. Like everything in this pack, the API only takes URLs - so a local
LoadImageoutput has to go throughImgBBUpload(or any hosted URL) before it becomes aReference. Themodify_image.jsonexample shows a hardcoded hosted URL; for your own images, add the ImgBB hop. - "The edit didn't change anything" - your
Referenceweight is too high, or the prompt is describing the image instead of instructing a change. Make it a verb sentence. - The whole image got redrawn instead of edited - weight too low, or the prompt implies a total scene change. Back the weight up.
- Closed-API caveats - content policy is Luma's; refused instructions fail as generation errors, and every attempt is a paid call. Iterate on
photon-flash-1before committing credits onphoton-1.
It's a small node with a specific job, but it's the one you'll reach for when you've got a good image and want the same image with one thing different - no inpainting mask, no local edit model, just a sentence.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| client | LUMACLIENT | — | |
| model | COMBO | 2 options: photon-1, photon-flash-1 | |
| prompt | STRING | — | |
| modify_image_ref | REFERENCE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image_url | STRING | — |
| generation_id | STRING | — |
| image | IMAGE | — |