Nodes/Sage Utils/HiDream E1 Instruction
ComfyUI Node

HiDream E1 Instruction

Formatting the two-line prompt HiDream E1's editor actually wants

By arcum42·Created 2 years ago·Updated 28 days ago· 33
HiDream E1 Instruction
    • prompt
    instruction
    description

    HiDream's E1 models are the image editing line from the lab that brought you HiDream-I1 - same MIT licensing, completely different job. You give one of them an image, a short instruction ("make it sunset"), and a description of the target scene, and it edits the photo to match. The trick is that E1 doesn't want those two things jumbled together. It wants them as a strict two-part structure: an Instruction: line and a Description: line, in that order. HiDream E1 Instruction is the node that builds exactly that.

    So its real job is boring-but-essential: making sure your input matches the format the model was trained on, so you don't spend an evening wondering why your edit instructions are being ignored.

    How it works

    The node takes two text inputs - instruction and description - and formats them as:

    Instruction: Make the scene a sunset.
    Description: A serene beach with waves crashing, warm orange light, palm trees silhouetted.
    

    Two small touches in the implementation matter more than they look. First, it trims and cleans both strings, and if your instruction doesn't end with a period it appends one - because E1's prompt format is picky about that. Second, it validates: if either field comes in empty, the node raises an error rather than silently generating garbage. That's genuinely useful, because the failure mode of "empty description" on an editing model is a weird, prompt-blind result you can't easily trace.

    The single output is a plain STRING called prompt, which you feed into whatever node is running your HiDream E1 pipeline (typically the model's text encoder or a prompt-conditioning node).

    What you actually type

    Two multiline fields, both required:

    • instruction - the edit command: "turn day into night," "remove the person on the left," "change the dress to red."
    • description - the scene it should understand the target as: subjects, lighting, composition, mood.

    A good rule of thumb: instruction is the verb, description is the world. Put the action in one and the state of the scene in the other, and the format does the rest.

    Where it fits

    If you're already inside the Sage Utils ecosystem, this sits naturally next to the pack's prompt-building nodes - the same "get the text into the exact shape the model wants" philosophy as its Ernie and Lumina prompt formatters. If you're not, it's still a handy standalone formatter: one node, zero configuration, and it guarantees the Instruction:/Description: skeleton that E1 expects. Since HiDream E1 is a specialist tool and most people touch it for occasional edits, having the format handled for you is worth the pack install by itself.

    Installing

    Sage Utils install, nothing special:

    cd ComfyUI/custom_nodes
    git clone https://github.com/arcum42/ComfyUI_SageUtils.git
    cd ComfyUI_SageUtils && pip install -r requirements.txt
    

    Restart ComfyUI, or pull "Sage Utils" in via ComfyUI Manager.

    One honest caveat

    This node formats text; it does not call HiDream or any API, and it won't produce an image by itself. If you load a workflow that uses it, the actual generation still lives in your HiDream E1 nodes - this just makes sure the words arrive in the right order. And if you're looking at the bigger HiDream family expecting the E1's prompt style to apply to I1 or O1, it doesn't - those are different architectures with different prompting, so keep this formatter pointed at the E1 editing models it was built for.

    CategorySage Utils/text/prompt/hidream

    Inputs (2)

    NameTypeDefaultDescription
    instructionSTRINGThe instruction text for the HiDream E1 prompt.
    descriptionSTRINGThe description text to include in the HiDream E1 prompt.

    Outputs (1)

    NameTypeDescription
    promptSTRINGThe generated HiDream E1 prompt.