ComfyUI Node

Prompt Styler Depth

Depth-of-field presets for your prompt

By wolfden·Created 3 years ago·Updated about a year ago· 105
Prompt Styler Depth
    • positive_prompt_text_g
    • negative_prompt_text_g
    text_positive
    text_negative
    style
    log_promptNo

    SDXLPromptStylerbyDepth is the depth-of-field modifier in wolfden's SDXL Prompt Styler pack. It carries 20 presets built around focus and background blur - Macro, Extreme Shallow, Moderate, Deep, Landscape, Close-Up, Environmental Portraits, and the rest. Type your subject, pick a depth-of-field look, and the node wraps your text in that focus language.

    If you want that creamy-background portrait look or the everything-sharp landscape feel and you're tired of guessing which words trigger it, this is a handy shortcut. It's a single-facet node, so it's happiest as one link in a chain rather than the whole prompt.

    How it works

    Each depth style is a JSON entry with a {prompt} placeholder in its prompt field and a negative_prompt. Pick "Extreme Shallow Depth of Field" and your text_positive slots into a template that adds shallow-focus, blurred-background language. No model, no API, no key - string substitution against a small table. Because the output is plain text, you can feed it into another styler node to add setting or lighting.

    The negative is baked into each preset and merges with anything you put in text_negative.

    The inputs that matter

    • text_positive - your subject, or an earlier styler's output if chaining.
    • style - the depth-of-field look, 20 options.
    • text_negative - optional, merged with the preset's negative.

    log_prompt (No/Yes) prints the finished prompt to the console. Outputs are positive_prompt_text_g and negative_prompt_text_g, both strings; positive into the CLIP Text Encode feeding your positive conditioning, negative into the negative one. On SDXL the same string can go into both G and L of a CLIPTextEncodeSDXL.

    Installing it

    ComfyUI Manager: search SDXL Prompt Styler (wolfden), install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wolfden/ComfyUi_PromptStylers
    

    Restart ComfyUI and find it under the Style Prompts submenu. No models, no dependencies.

    Where people get tripped up

    The thing to remember: this is a prompt for depth of field, not a lens simulation. The model approximates the look from the words, so it's inconsistent - you'll get convincing bokeh on one seed and a flat background on the next. It's a bias, not a guarantee. If you need reliable, controllable background separation you're better off compositing or using a depth-based ControlNet, not text alone.

    Chaining is where the small nodes shine, but each one drags in its own inherited negative, and stacked negatives become a generic block that can fight your positive. Flip log_prompt to Yes, read what got built, and trim. The presets are JSON in the pack folder, easy to edit.

    Pack-wide caveat: these templates were tuned for SDXL and its CLIP encoder - strongest on SDXL, Illustrious, Pony, NoobAI. On 2026 LLM-encoded models the styling weakens and the inherited negative does nothing at CFG 1, where distilled checkpoints run, because the negative pass isn't computed. If the node doesn't appear after install, restart fully and check Style Prompts, not the root menu.

    CategoryStyle Prompts

    Inputs (4)

    NameTypeDefaultDescription
    text_positiveSTRING
    text_negativeSTRING
    styleCOMBO20 options: None byDepth, Architecture Depth of Field, Close-Up Depth of Field, Creative or Abstract Depth of Field, Deep Depth of Field, Environmental Portraits Depth of Field, +14
    log_promptCOMBONo2 options: No, Yes

    Outputs (2)

    NameTypeDescription
    positive_prompt_text_gSTRING
    negative_prompt_text_gSTRING