Image Generation
Luma's Photon image generator, inside your graph — with reference support
- client
- image_ref
- style_ref
- character_ref
- image_url
- generation_id
- image
This pack isn't only video. LumaImageGeneration ("Image Generation") drives Luma's Photon models - photon-1 and the faster/cheaper photon-flash-1 - from inside ComfyUI, and it's where all the reference plumbing in this pack actually lands. Photon is a closed, hosted image model in the same competitive bucket as Midjourney and GPT Image: no weights for you, paid API calls, and consistently strong aesthetic quality. You use it because you want that quality without running a big local model, or because you specifically want to chain it into the video nodes.
What makes the node interesting is what it returns. Most hosted-image nodes hand you a URL and say good luck. This one outputs three things: image_url (the hosted file), generation_id, and an actual image tensor of type IMAGE - the node downloads the result and loads it locally, so you can wire it straight into ComfyUI's PreviewImage or into a local upscale/inpaint pass. That's a genuinely nice touch for a cloud node, and it's why the example workflows end in a PreviewImage rather than leaving you to paste a URL.
The inputs that matter
model-photon-1(quality) orphoton-flash-1(fast/cheap). Start on flash, finish on photon.prompt- the image prompt.aspect_ratio-9:16,3:4,1:1,4:3,16:9,21:9.image_ref(CONCAT_REFERENCES),style_ref(REFERENCE),character_ref(CHARACTER_REFERENCE) - the optional reference inputs. These come from the pack's ownReference,ConcatReferences, andCharacterReferencenodes; wire them in for subject, style, or character consistency.filename- optional; the image always saves locally (as a.jpgin theoutputsfolder), and this renames it from the default generation-id name.
How it works
The node calls Luma's image-generation endpoint, polls until the generation completes (it checks every second rather than the three-second video cadence), downloads the result, and loads it back through ComfyUI's own image loader so you get a native tensor. The reference types are worth understanding because they mirror how the API thinks: a Reference is one image URL plus a weight (0–1) that controls how hard the model leans on it; ConcatReferences bundles up to four of them into an image_ref for multi-image subject guidance; CharacterReference builds an "identity" from up to four URLs so a character stays recognizably itself. All three feed in here.
Installing
Same pack install as everything else: ComfyUI Manager → search "ComfyUI-LumaAI-API", or clone into ComfyUI/custom_nodes and pip install -r requirements.txt. Light dependencies (lumaai, requests, numpy, Pillow), no local models, no VRAM - Photon runs entirely on Luma's side. You need a LumaAIClient node with your API key wired in.
Common issues
- Prompt widget is input-only - the
promptfield is force-input, so you'll typically wire it from aPrimitiveNodetext box rather than typing in place. The example workflows all do this. - References ignored - a
style_refneeds to come from aReferencenode with a sensibleweight; 1.0 (the default) is often too strong and drowns your prompt. Dial it toward 0.3–0.6 and the prompt starts pulling its weight again. - Image tensor vs URL confusion - the
image_urlstring is for feeding into Luma's video nodes (which need hosted URLs), while theimagetensor is for local ComfyUI nodes. Using the wrong one for the wrong purpose is the most common wiring mistake. - No local filtering - it's a closed API, so content policy is Luma's, not yours. A refused prompt raises a failed-generation error; reword and retry.
The reference workflow (img_ref.json, style_ref.json, char_ref.json in the pack's workflows folder) shows the full pattern: LoadImage → ImgBBUpload → Reference → ConcatReferences → LumaImageGeneration. That's the whole "generate with my reference" flow, done the official way.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| client | LUMACLIENT | — | |
| model | COMBO | 2 options: photon-1, photon-flash-1 | |
| prompt | STRING | — | |
| aspect_ratio | COMBO | 6 options: 9:16, 3:4, 1:1, 4:3, 16:9, 21:9 | |
| image_refopt | CONCAT_REFERENCES | — | |
| style_refopt | REFERENCE | — | |
| character_refopt | CHARACTER_REFERENCE | — | |
| filenameopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image_url | STRING | — |
| generation_id | STRING | — |
| image | IMAGE | — |