Prompt Studio Reference Image (optional)
A Second Image Slot That's Allowed to Be Empty
- image
- mask
What this node is for
By 2026 the useful editing trick stopped being masks and adapters and became "here's a picture and a sentence, change this one thing." The reference goes into the edit model's context; the model reads it and the sentence together. That's how Krea 2 Edit and the Identity Edit LoRA work, and it's the shape of the most-upvoted Krea reference workflow of the summer.
So an edit workflow wants two images: the thing being edited, and an optional reference. Awkward in ComfyUI, where an input is either wired or it isn't, so you keep two copies of the workflow.
Prompt Studio Reference Image (optional) is the escape hatch. Its image output is allowed to be nothing. Empty reference, and downstream nodes behave as if that input never existed. Drop a picture into Studio's composer, and the same saved workflow does two-image edits.
It only means anything inside Prompt Studio's world - plumbing for the [PS] workflows that tiko13/ComfyUI_PromptStudio drives, not a general-purpose loader. If you don't use Prompt Studio, skip it.
How it works
Prompt Studio is the heavy end of the "LLM as a tool node" category: rather than one enhancer node rewriting one prompt field, it's a chat front end over your saved [PS] workflows, with a local Ollama, KoboldCpp, or llama.cpp model doing the writing. It queues them as snapshots with injected widget values.
This node is one of those injection points. Its image_ref holds a small JSON reference - filename, subfolder, type - pointing at an image already inside ComfyUI's output, temp, or input storage. No filesystem paths cross from the browser. Blank reference, and the node short-circuits to (None, None), so the edit nodes keep their single-image behavior.
Two details from the source explain behaviour you'd otherwise file as a bug. An unconnected copy of this node doesn't count: Studio only treats an edit workflow as reference-capable if the node's image output is actually linked, so wire it or you'll never see the Reference tile. And empty is cache-stable - with no reference the node reports no-reference for change detection, so adding it to a workflow doesn't force re-runs.
The fields and outputs that matter
Only two inputs, and you type in neither.
image_ref is the injected reference. Leave it empty; Studio fills it when you drop an image into the Reference tile. source_name defaults to Reference image and is just the label shown when a workflow has multiple image inputs - rename it if you also have an Image Source node and want to tell them apart.
Outputs are image and mask. Wire image into the optional second-image slot of your edit model; in the bundled Krea 2 recipe that's source_image_b on Krea2EditModelPatch and image_b on both grounded encoder nodes. mask comes from the PNG's alpha channel, inverted so opaque pixels are 0 - normal ComfyUI convention - and multi-frame files return as a batch. Ignore it unless you're feeding an alpha cutout somewhere.
Installing it
One install covers the whole pack:
cd ComfyUI/custom_nodes
git clone https://github.com/tiko13/ComfyUI_PromptStudio
then restart ComfyUI. ComfyUI Manager does the same job - search the pack title. The pleasant surprise is that the pack has no runtime pip requirements at all: no requirements.txt, nothing in pyproject.toml, just ComfyUI's own server, folder_paths, and media stack. What it doesn't install is the LLM runtime; bring your own Ollama, KoboldCpp, or llama.cpp server.
The node itself needs nothing else, but using it in anger means the Krea 2 edit stack: Krea 2 Turbo, the Qwen3-VL 4B encoder (BF16 or FP8, either works), the Qwen Image VAE, TextFusion, Identity Edit v1.2, the Krea2 Edit node pack - and Ultimate SD Upscale for the upscale recipe. The setup wizard walks you through it, pulls missing packs via Manager, and checks the Krea2 Edit nodes expose target_latent (pack v1.2.5 or newer).
Where people get burned
You wired it into a required input. The README says it plainly: connect this node only where an absent image is supported. Feed a required IMAGE input and clearing the Reference tile turns a working edit into a validation error, because nothing arrives. The Krea2 Edit patch is built for it; a stock Load Image node isn't.
No Reference tile in Studio. Check three things: is this a [PS] edit template (prompt slot, exactly one image output, a Prompt Studio Image Source), is the reference node's output actually linked, and does hovering the workflow status show a validation error.
Ghosting, blur, or a second person. That's the edit model, not this node. In Krea2 Edit land the usual culprits are fit mode - fit, not crop - and reference boost, where low values ghost and higher ones clean it up at some cost to likeness. Outfit-reference LoRAs are still experimental: the popular one is trained on female outfits only and will sometimes give you two people. Different seed, or force "single person" in the prompt.
One last thing: a custom node is arbitrary Python that runs on import, and this ecosystem's worst incident was an LLM-vision node shipping malware. Read a repo before letting Prompt Studio's wizard install it for you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image_ref | STRING | Optional reference supplied by Prompt Studio. Empty returns no image; connect to optional reference inputs. | |
| source_name | STRING | Reference image | Name shown when an editing workflow has multiple image inputs. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |