Nodes/Mikey Nodes/Prompt With SDXL (Mikey)
ComfyUI Node

Prompt With SDXL (Mikey)

Prompt With SDXL (Mikey Nodes) — one node for prompt, style, ratio, and both text encoders

By bash-j·Created 3 years ago·Updated 10 months ago· 188
Prompt With SDXL (Mikey)
    • samples
    • positive_prompt_text_g
    • negative_prompt_text_g
    • positive_style_text_l
    • negative_style_text_l
    • width
    • height
    • refiner_width
    • refiner_height
    positive_promptPositive Prompt
    negative_promptNegative Prompt
    positive_stylePositive Style
    negative_styleNegative Style
    ratio_selected
    batch_size1
    seed0
    output_optionprompt -> clip_g and style -> clip_l

    SDXL's biggest ergonomic quirk for newcomers is that it doesn't have one text encoder - it has two, OpenCLIP ViT-bigG and CLIP ViT-L, wired together as clip_g and clip_l. The second encoder is where a lot of SDXL's extra prompt control over composition and lighting comes from, but the standard way of using it (a separate CLIPTextEncodeSDXL node with its own width/height/target/crop fields) is genuinely confusing the first few times you meet it. Prompt With SDXL collapses that whole setup, plus an empty latent, into a single node.

    What it actually consolidates

    This one node replaces what would otherwise be a CLIPTextEncodeSDXL node plus an Empty Latent Image node plus some manual bookkeeping about which text goes to which encoder. You get four separate text boxes - positive_prompt, negative_prompt, positive_style, negative_style - a ratio picker (the same trained-SDXL-resolution list as Mikey's Empty Latent Ratio Select SDXL node), a batch size, a seed, and one dropdown that decides the whole routing question for you: output_option.

    That dropdown is the node's real value. Its five choices spell out, in plain language, exactly how your prompt and style text get distributed across the two encoders - for example "prompt -> clip_g and style -> clip_l" sends your main prompt to the bigG encoder and your style text to the L encoder, while "prompt+style -> clip_g and prompt+style -> clip_l" sends the combined text to both. This is the exact routing decision the community otherwise has to learn by trial and error with the stock node - here it's presented as a menu instead of a mystery.

    The outputs

    Nine of them, and each one earns its place: samples (the empty LATENT, sized to your chosen ratio and batch), positive_prompt_text_g / negative_prompt_text_g / positive_style_text_l / negative_style_text_l (the actual text strings that got routed to each encoder - useful for logging into a Save Image With Prompt Data node's metadata fields), and width / height / refiner_width / refiner_height. That last pair exists because SDXL originally shipped with an optional refiner model for a second denoising pass; the community mostly stopped bothering with it once fine-tuned checkpoints got good enough on their own, but this node still gives you the dimensions you'd need if you're one of the people still running a refiner stage.

    Installing

    Part of the full Mikey Nodes pack - ComfyUI Manager, search "Mikey Nodes," install, restart, or cd ComfyUI/custom_nodes && git clone https://github.com/bash-j/mikey_nodes and restart manually. Nothing extra to download for this node specifically; the ratio list and encoder logic are baked into the pack's own Python code.

    Where people trip up

    • Picking the wrong output_option and getting muddy results. If your positive prompt and style text end up fighting each other visually, try a different routing option - sending them to separate encoders (rather than combining both into both) tends to give each one more distinct influence.
    • Forgetting this replaces two nodes, not one. If you already have a separate Empty Latent Image node in your graph and add this on top, you'll end up with two latents and have to explicitly pick which one feeds your sampler - this node is meant to be the only latent source in that part of the graph.
    • Blank style fields doing nothing. Leaving positive_style/negative_style at their literal placeholder text ("Positive Style" / "Negative Style") means that placeholder text gets encoded as-is - clear the fields or replace them with real content before you rely on style routing actually doing something.
    CategoryMikey

    Inputs (8)

    NameTypeDefaultDescription
    positive_promptSTRINGPositive Prompt
    negative_promptSTRINGNegative Prompt
    positive_styleSTRINGPositive Style
    negative_styleSTRINGNegative Style
    ratio_selectedCOMBO15 options: 1:1 [1024x1024 square], 8:5 [1216x768 landscape], 4:3 [1152x896 landscape], 3:2 [1216x832 landscape], 7:5 [1176x840 landscape], 16:9 [1344x768 landscape], +9
    batch_sizeINT11–64
    seedINT00–18446744073709550000
    output_optionCOMBOprompt -> clip_g and style -> clip_l5 options: prompt -> clip_g and style -> clip_l, prompt+style -> clip_g and prompt+style -> clip_l, prompt+style -> clip_g and style -> clip_l, prompt -> clip_g and prompt+style -> clip_l, prompt+style -> clip_g and prompt -> clip_l

    Outputs (9)

    NameTypeDescription
    samplesLATENT
    positive_prompt_text_gSTRING
    negative_prompt_text_gSTRING
    positive_style_text_lSTRING
    negative_style_text_lSTRING
    widthINT
    heightINT
    refiner_widthINT
    refiner_heightINT