Nodes/ComfyUI_MileHighStyler/Focus Styler (Advanced)
ComfyUI Node

Focus Styler (Advanced)

Depth-of-field and focus control for SDXL

By TripleHeadedMonkey·Created 3 years ago·Updated about a year ago· 66
Focus Styler (Advanced)
    • text_positive_g
    • text_positive_l
    • text_positive
    • text_negative_g
    • text_negative_l
    • text_negative
    text_positive_g
    text_positive_l
    text_negative
    focus
    negative_prompt_toBoth
    log_prompttrue

    FocusStyler (Advanced) is about where the sharpness lands. Its dropdown holds 67 focus options - everything from Autofocus and percentage focus areas (10% Focus Area through 100% Focus Area) to a long tail of more specific focus and depth-of-field descriptions. Pick one and it wraps your prompt in language that tells the model how much of the frame should be crisp versus how much should melt into bokeh. It's an optical control, the kind of thing that separates a snapshot from a photograph, and it's one of the more genuinely useful stylers in the pack.

    There's no basic-flavor FocusStyler in this set - it ships Advanced-only, meaning it's built for SDXL's two text encoders from the start. SDXL runs OpenCLIP-ViT/bigG and CLIP-ViT/L together, and the second encoder carries a real part of SDXL's grip on composition and optical detail, so a focus styler is a natural fit for the dual-encode path.

    How it works

    The usual MileHighStyler substitution: each focus option is a text template with a {prompt} placeholder. Your text drops in, and the focus language gets automatically weighted up (around 2.0) so the depth-of-field cue pushes while your subject stays at normal strength.

    What you set

    • text_positive_g / text_positive_l - your prompt for the G and L encoders; same text in both is normal.
    • text_negative - your negative prompt.
    • focus - the 67-option dropdown. No option disables it.
    • negative_prompt_to - Both, G only, or L only, routing the built-in negative. Default Both.
    • log_prompt - prints the assembled prompt to the console.

    Outputs: text_positive_g, text_positive_l, merged text_positive, and the three negatives (text_negative_g, text_negative_l, text_negative). Wire _g and _l into a CLIPTextEncodeSDXL node; on a plain CLIP Text Encode, use the merged pair.

    Installing it

    ComfyUI Manager, search ComfyUI_MileHighStyler. If Manager doesn't list it, clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TripleHeadedMonkey/ComfyUI_MileHighStyler
    

    Restart ComfyUI. No models, no dependencies - JSON templates only, instant install.

    Common snags

    focus overlaps with the depth category inside PerfectionStyler - both push on depth of field - so if you're running both, you can end up double-specifying it and confusing the model about what's sharp. Pick one place to control focus. And the six outputs: pick a lane, SDXL dual-encode uses _g and _l, everything else uses the merged pair.

    The standing pack caveat: the whole two-encoder design is SDXL-specific, so this belongs on Illustrious, Pony, Juggernaut, RealVis and other SDXL finetunes. On a 2026 LLM-encoded model (Flux 2, Z-Image, Anima) there's no G/L to split and the weighting is discarded - write "shallow depth of field, subject sharp, background soft" in plain words instead.

    Categoryali1234/stylers

    Inputs (6)

    NameTypeDefaultDescription
    text_positive_gSTRING
    text_positive_lSTRING
    text_negativeSTRING
    focusCOMBO67 options: No option, 10% Focus Area, 100% Focus Area, 20% Focus Area, 30% Focus Area, 40% Focus Area, +61
    negative_prompt_toCOMBOBoth3 options: Both, G only, L only
    log_promptBOOLEANtrue

    Outputs (6)

    NameTypeDescription
    text_positive_gSTRING
    text_positive_lSTRING
    text_positiveSTRING
    text_negative_gSTRING
    text_negative_lSTRING
    text_negativeSTRING