LUMA_generator @.@
Luma Dream Machine in ComfyUI for free — cookie not included
- image
- luma_id
Let's get the name out of the way first. The pack is called comfyui_lumaAPI, but there's no official API key anywhere in it. The "API" here is Luma's internal web endpoint, and the "key" is your logged-in browser session cookie pasted into a key.json file. This is a mid-2024 Dream Machine era community hack, the README literally opens with "for learning purpose only," and it's the cheapest way to get real Luma image-to-video from inside a ComfyUI graph - assuming you're comfortable with the asterisks that come with it.
Why you'd reach for this
Because Luma's cloud model runs on their GPUs, not yours. If you want cinematic, physically-plausible camera motion - the stuff that made Dream Machine famous when it dropped in June 2024 - and you don't own the VRAM for a local video model, this node sends your image up to Luma and gets a video back. It costs you nothing at runtime except your Luma account's generation quota. That's the whole deal: no model downloads, no CUDA pain, just a network call.
How it actually works
The node (LUMA_YoC_generator) takes your image tensor, converts it to PNG bytes, uploads them to a presigned S3 URL Luma hands out for a file_upload request, then POSTs to the same internal generations endpoint the lumalabs.ai web app uses. The payload includes your prompt and a hardcoded aspect_ratio: 16:9 - there's no way to change it from the node.
One genuinely clever bit: the code checks torch.std(tensor) < 0.01 and, if your input is effectively blank, skips the upload entirely and sends prompt-only. Feed it an EmptyImage and you get text-to-video. Feed it an actual image and you get image-to-video. The catch is that this also fires on genuinely dark or flat images, so a near-black frame silently becomes a text-to-video call. Keep that in mind.
The node returns a generation id string and appends it to ComfyUI/output/luma video/record_id.txt so you can find it later.
The inputs that matter
- image - wire in a LoadImage (or EmptyImage for pure text-to-video).
- prompt - default
movie,cinematic; multiline. Luma's own prompt expansion does the heavy lifting here. - Enhance_prompt - a boolean (default on) that maps to Luma's
expand_promptflag. Leave it on; it's why short prompts look this good.
Output is a single luma_id STRING. The generator doesn't produce a video - it produces a receipt. Copy that id into the pack's other node, LUMA_API_result_YoC, in a second workflow to actually collect the video.
Installing it
ComfyUI Manager works - search for comfyui_lumaAPI - or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/superyoman/comfyui_lumaAPI.git
# restart ComfyUI
The requirements.txt is just requests and Pillow, both of which ComfyUI already ships, so the README's "pip install if necessary" is rarely necessary. No models, no weights, nothing to download.
Where people get burned
The cookie. key.json ships with a dead session string from the author, and it will not work. Login at lumalabs.ai, open DevTools (F12 → Network/XHR), copy the Cookie header from any request, and paste it in. The code prints Error: Cookie is required if the file's unreadable, but an expired cookie fails more quietly - generations just don't come back.
Session cookies rot, Luma changes endpoints when they feel like it, and abusing your own account's internal API is a gray area that can get the account flagged. The official Dream Machine API (with a real key) exists if you want something that won't break on a whim. Treat this pack as a fun learning tool that happens to produce excellent videos, not as infrastructure.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | movie,cinematic | — |
| Enhance_prompt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| luma_id | STRING | — |