Nodes/ComfyUI-DonutNodes/Donut Reference Guidance
ComfyUI Node

Donut Reference Guidance

Hand Krea 2 an image without touching your LoRA

By DonutsDelivery·Created about a year ago·Updated about 13 hours ago· 23
Donut Reference Guidance
    • reference_a
    • reference_b
    • enabled
    enabledfalse
    image_a
    image_b
    use_reference_bfalse
    edit_activefalse

    Krea 2 can see. Its text encoder is Qwen3-VL, a vision-language model, so reference images aren't bolted on through an adapter - they go in as native visual conditioning, next to your text. That's the good news. The awkward news is that "reference image" now means two different things in the same workflow, and mixing them up produces confusing results.

    Donut Reference Guidance is the second one. It feeds whole images to Krea 2's native visual conditioning for a normal generation pass. Edit Studio is the first one - it crops references for the identity-edit LoRA path. Same reference library, completely different job.

    What it does

    The node is small, and it's small on purpose. Four required fields, one optional, three outputs. Pick up to two images, and it hands back those images plus an enabled flag for the conditioning node to consume. It doesn't crop, doesn't resize, doesn't load a LoRA. Full frames, as-is - which is what native reference conditioning wants.

    The interesting part is what it does when editing is on: it stands down. Wire edit_active from Edit Studio's edit_mode output, and while an edit pass is running, Reference Guidance returns nothing and enabled: false. That's not a bug or a limitation to work around; it's the pack's way of saying these are two different conditioning paths and you should use one at a time. Loading the identity-edit LoRA and pushing native references at the same frame is how you get an image that obeys neither.

    It also participates in caching properly. The node's change detection hashes the reference files themselves, so swapping the image in a slot reruns the graph - an easy thing to get wrong with file-backed inputs, and the reason your reference can silently not update in some other packs.

    How to use it

    The reference slots work exactly like Edit Studio's: click the node, paste, drag, or pick a file. Images land in ComfyUI/user/donut/edit_references/, addressed by content hash, and the widget stores only the ID. So the workflow JSON stays portable-ish - and stops working if you forget to copy that folder to the new machine.

    Then:

    • enabled - the master switch.
    • image_a (required when enabled), image_b with use_reference_b for a second one.
    • edit_active - optional BOOLEAN, wire it from Edit Studio.

    Outputs are reference_a, reference_b (IMAGE) and enabled (BOOLEAN). Per the pack's node guide, those go to the corresponding native-reference inputs on Donut Prompt Conditioning along with the flag. With guidance off, text encoding is unchanged, and negative conditioning stays text-only either way - references are a positive-side tool here.

    What references are actually for

    They condition the image, they don't clone it. The pack's own guidance is to describe which elements to borrow in the generation prompt: "the palette and the soft window light from the reference," not silence and hope. This matches where the whole field landed - since 2026, the answer to "how do I get a consistent character" has been to show a model a picture and tell it what to do, rather than to encode an identity embedding. Krea 2's version of that is visual conditioning on a normal generation pass, no crop, no LoRA, no second pass.

    The practical consequence: this is great for style, lighting, palette, composition and wardrobe, and unreliable for exact likeness. Likeness is what the identity-edit LoRA is for, and that's Edit Studio's side of the fence.

    Install

    Part of DonutNodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git donutnodes
    cd donutnodes
    python -m pip install -r requirements.txt
    

    Or find DonutNodes in ComfyUI Manager and restart. The node itself needs no extra model files, but it's only useful on a Krea 2 graph, and that means the base model (krea2_turbo_bf16.safetensors, roughly 26 GB, in models/diffusion_models), the separate Qwen3-VL text encoder (qwen3vl_4b_fp8_scaled.safetensors in models/text_encoders) and the Qwen-Image VAE. New Krea 2 users miss the text encoder constantly - it is a separate download from the UNet, and nothing loads without it.

    Where it goes wrong

    "Add reference A in Reference Guidance, or turn reference guidance off." Same idiom as Edit Studio: enabled with an empty slot is a hard validation error, and that's the message.

    "Add reference B in Reference Guidance, or turn the second reference off." use_reference_b on, slot B empty.

    It seems to do nothing. Check whether Edit Studio is active - if edit_active is wired, the node deliberately returns enabled: false and your references are being ignored. That's the design working.

    References vanish across installs. The workflow stores hash IDs, not pixels. Copy ComfyUI/user/donut/edit_references/ when you move the workflow, and save the workflow after changing a slot.

    You expected likeness. Describe what to borrow in the prompt and, if you need the same face back, go through the edit path instead. Reference conditioning is a suggestion, not a cast.

    Categorydonut/conditioning

    Inputs (5)

    NameTypeDefaultDescription
    enabledBOOLEANfalse
    image_aSTRING
    image_bSTRING
    use_reference_bBOOLEANfalse
    edit_activeoptBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    reference_aIMAGE
    reference_bIMAGE
    enabledBOOLEAN