Nodes/Qwen-Image Photo Styles/PE-T2I Photo Style Prompt
ComfyUI Node

PE-T2I Photo Style Prompt

Pick a look, type one line, get a real prompt

By pottokao-dotcom·Created 22 days ago·Updated 22 days ago· 17
PE-T2I Photo Style Prompt
    • prompt
    • negative
    • width
    • height
    • wh_ratio
    ◄prompt►
    ◄style▾►
    ◄endpointhttp://127.0.0.1:8207►
    ◄seed0►
    ◄temperature0.30►
    ◄model►
    ◄timeout_s600►
    ◄system_prompt_path►

    Qwen-Image is a model you prompt like a person, not a tag list. Its encoder is an LLM, so (word:1.3) is inert, and what moves the picture is concrete photographic language - a lens, a light, a film stock. Writing that paragraph is a skill. PE-T2I Photo Style Prompt is the skip-the-skill option: type one line, pick a style, and a small prompt-rewriter model writes it for you.

    It is not a model loader: no VRAM, nothing to do with GGUF versus fp8. Out comes text, text, two integers and a string - prompt, negative, width, height, wh_ratio.

    What it is, and why you'd reach for it

    You type a short line, pick a style, and get back a long English prompt, a matching negative, and the width/height the rewriter picked for the aspect ratio. It's the "LLM in the graph" pattern - one LLM writing the instruction for another - pointed at a purpose-trained PE-T2I rewriter rather than at Ollama.

    The 17 styles are camera language plus mood, never a photographer's name. The framing to internalise is the author's: the style only decides what you left open. Name your subject and colours and it keeps them; leave something vague and the style fills it in.

    How it works

    Less magic than the README's flowchart. The node sends a chat request with a bundled system prompt (style_sp_plus.txt, adapted from Qwen's official Qwen-Image-2.1-PE-T2I system prompt), your line, and the style sheet below a --- divider. The sheet's Negative: / Grain lead: / Grain closer: directives are stripped first, so the rewriter never sees them.

    The reply is JSON with rewritten_prompt and wh_ratio. The node discards everything before the last </think> so a thinking rewriter's scratch-work stays out of your conditioning, and retries three times if the prompt comes back under 200 characters. Then it raises rather than hand you garbage.

    The negative is built locally: a fixed base list plus the style's own Negative: line where it has one (eight of 17 do). Four grain-heavy styles also wrap the rewrite in a fixed grain bracket, because the rewriter dilutes grain wording and the DiT would render it clean.

    The inputs and outputs that matter

    • prompt - your short line, multiline. Short is genuinely fine.
    • style - None plus the 17. None isn't broken: no sheet, plain rewrite, still a negative and a size.
    • endpoint - the rewriter's address, default http://127.0.0.1:8207.
    • seed - does three jobs: sent to the rewriter, used to perturb retries, and seed % 3 picks one of the style's mood sub-presets (Alienation / Frenzy / Desolation for Black Fury). Re-roll it to change the feeling without leaving the style.
    • temperature - 0.3 by default, up to 1.5. Raise it when rewrites go samey.

    Optional: model (needed for vLLM or LM Studio, optional for llama-server), timeout_s (600 - a thinking rewriter really can take minutes), system_prompt_path for your own system prompt.

    Wire prompt and negative into your Qwen text encoder, width/height into EmptyLatentImage. wh_ratio is a label like 3:2, shown in the node's UI panel.

    Install

    No Python dependencies - it's stdlib urllib. From ComfyUI Manager, search Qwen-Image Photo Styles, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pottokao-dotcom/ComfyUI-QwenImage-PhotoStyles
    

    Restart ComfyUI. The other half of the install is the rewriter server, and without it the node is dead weight: run Qwen/Qwen-Image-2.1-PE-T2I (or the author's quantized builds) under vLLM, llama-server or LM Studio, and point endpoint at it. DiT, text encoder and VAE are your own graph.

    Where people get burned

    The endpoint is local-only in practice. No Authorization header, no field for a key - so "any OpenAI-compatible endpoint" means locally served backends, not OpenAI. It also guesses the path: no path gets /v1/chat/completions appended, a path ending in /v1 gets /chat/completions. Anything else, paste the full URL.

    Sizes are ~1 megapixel, snapped to 32. 3:2 comes out 1248x832, 16:9 as 1376x768. No megapixel knob - for native 2K, feed your own numbers to EmptyLatentImage.

    Your negative does nothing at CFG 1. The author's example workflow runs the first 15 steps at cfg 1.0 and the last 10 at cfg 3.0, and the second pass is where the negative is actually computed.

    Styles are read off disk at import. The dropdown comes from listing styles/*.txt and reading each first line, so edit a sheet and restart; break the ### Style: first line and the label falls back to the filename.

    The errors are informative. An unreachable server names the URL it tried - curl it. "No usable rewrite after 3 attempts" means the model replied with JSON the node couldn't parse, usually because you pointed it at a chat model.

    One thing to check before building on it

    style_sp_plus.txt is a derivative of Qwen's official PE-T2I system prompt and stays under the Qwen Research License; the node code, style sheets and presets are MIT. Going commercial means reviewing that license, or pointing system_prompt_path at a prompt of your own, which is the clean way around it.

    The honest caveat: purpose-built rewriters are new enough that there's no community track record behind them yet.

    CategoryQwen-Image

    Inputs (8)

    NameTypeDefaultDescription
    promptSTRING—
    styleCOMBO18 options: None, Black Fury, Cold Power, Color Behind Glass, Corner Elegance, Everyday Punchline, +12
    endpointSTRINGhttp://127.0.0.1:8207—
    seedINT00–4294967295—
    temperatureFLOAT0.300–1.5—
    modeloptSTRING—
    timeout_soptINT60030–3600—
    system_prompt_pathoptSTRING—

    Outputs (5)

    NameTypeDescription
    promptSTRING—
    negativeSTRING—
    widthINT—
    heightINT—
    wh_ratioSTRING—