Nodes/ComfyUI-ZImagePowerNodes/❌[DEPRECATED] Style String Injector (old version)
ComfyUI Node

❌[DEPRECATED] Style String Injector (old version)

The old way to inject a style into your prompt — you probably want the new one

By martin-rizzo·Created 8 months ago·Updated 8 days ago· 358
❌[DEPRECATED] Style String Injector (old version)
    • STRING
    category
    style"Phone Photo"
    string

    This node does exactly one thing: it takes your raw prompt string, a category and a style out of the pack's library, and hands you back the same prompt with that style's phrasing woven in. That's it. No model, no VAE, no latent space - a string goes in, a string comes out.

    It's marked ❌[DEPRECATED] in ComfyUI's node list, and that's not a threat. It still runs fine. But the pack has moved on, and so should your new workflows. The deprecated version is the one from the pack's v0.9.0 days; it's been replaced by the Style String Injector v2 (which adds a searchable thumbnail gallery) and, more importantly, by the Style Prompt Encoder, which applies the style and runs the Qwen3-4B text encoder in one step. The string injector makes sense in one narrow case: you want to edit the prompt text before it gets encoded - say you're feeding the result into your own text-encoder node or a LoRA workflow. Otherwise just reach for Style Prompt Encoder and save yourself a connection.

    How it works

    The pack ships a big library of predefined styles in predefined_styles.py. This node pulls the style definitions pinned to version 0.9.0, looks up whichever style you picked, and runs style.apply_to_prompt(your_string). Every style is essentially a prompt template - it wraps or rewrites your subject line to push the image toward "Phone Photo", "Noir Photo", "Ultimate Anime", and so on. The style definitions themselves are written and tuned for Z-Image Turbo, which matters: these aren't generic SDXL styles, they're phrasing the Qwen3-4B encoder responds to.

    The inputs that matter

    The full input list is short:

    • category - a combo that filters the style list (photo vs illustration, that kind of thing).
    • style - the actual style to apply. Defaults to "Phone Photo".
    • string - your prompt, multiline.

    The single output is a STRING: the prompt after the style is applied. Wire it into a CLIP text encode (or the Style Prompt Encoder's string input) and continue as normal.

    Installing it

    It comes with the whole pack, which has zero Python dependencies - install via ComfyUI Manager by searching "Z-Image Power Nodes", or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/martin-rizzo/ComfyUI-ZImagePowerNodes.git
    

    Then restart ComfyUI. One thing worth knowing: this pack is built on ComfyUI's new Nodes 2.0 API, so a fairly recent ComfyUI (v0.11.0+) is required - on an old install nothing in the pack will even register.

    The one gotcha

    Because the style definitions are versioned, updating the pack can break workflows saved with older versions. The node's own validation will throw something like The category name ... is invalid. May be the node is from an older version. The fix is boring and quick: re-pick the category and style from the dropdowns and re-save. If you find yourself fixing that more than once, that's the pack telling you to migrate to the non-deprecated nodes.

    Category⚡Z-Image/__deprecated

    Inputs (3)

    NameTypeDefaultDescription
    categoryCOMBOThe category of styles you want to select from.
    styleCOMBO"Phone Photo"The style you want for your image.
    stringSTRINGThe prompt to modify.

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGThe prompt after applying the selected style.