Nodes/comfyui-prompt-skill/提示词合规自检 (本地)
ComfyUI Node

提示词合规自检 (本地)

A Free Offline Prompt Linter for FLUX.2 and Qwen-Image — No API Key, No Bill, No Excuses

By DarthVanDerLimdr·Created 15 days ago·Updated 14 days ago· 0
提示词合规自检 (本地)
    • 检查报告
    • 文件路径
    ◄提示词►
    ◄目标模型flux2-dev►

    The pack this ships in has a fancy sibling that calls an LLM and charges you per rewrite. PromptSkillCheck (in the menu: 提示词合规自检 (本地)) is the other half, and it's the one I'd install first. It's a linter, not a generator: you feed it a prompt, it tells you which official rules you broke. No API key, no config file, no network call, no model to load. It runs regexes and prints a report.

    Unglamorous, and also the cheapest way to find out why your FLUX.2 [dev] images keep coming back looking like a stock-photo catalogue.

    Why a checklist is enough

    Because most of the mistakes are mechanical. On FLUX.2, the encoder is a Mistral-3 vision-language model that treats your prompt as an instruction, so the SDXL vocabulary you carried over actively hurts: masterpiece, 8k, ultra detailed costs tokens and buys nothing, and every quality adjective is a token taken away from an actual description of the scene. The checker has a hardcoded list for exactly that - photorealistic, hyperrealistic, masterpiece, 8k, 4k, octane render, award-winning, highly detailed, plus the Chinese equivalents - and flags them as words that pull the render toward plasticky CGI.

    Same story with negatives. There's no negative channel on [dev], so 不要模糊 is not a constraint, it's a suggestion to put blur in the picture. The node scans for exclusion phrasing and suggests restating it as a property of the frame. It also skips imperative delete language ("remove the logo") - the author tested it, and that phrasing gets executed as an edit rather than ignored.

    What the report covers

    Two inputs, that's it: 提示词 (multiline, or wire a STRING from an upstream node) and 目标模型 (flux2-dev or qwen-image-2-1, defaults to flux2-dev).

    For flux2-dev it checks length against the 30–300 word band, counting English words plus Chinese characters - too short and [dev] won't expand for you, too long and you're paying for filler. Then filler words, exclusion phrasing, whether you mentioned lighting at all (the author's note is that this is the single biggest lever on output quality), how many hex colour values you used and a reminder that hue drifts five to ten degrees regardless of what you typed, and whether you're missing focal length, aperture, or frame format - leave that slot empty and the model fills it with its own studio-portrait prior, which is how your carefully specified background gets steamrolled.

    A second set of rules is pattern-based rather than gated on whether you actually attached images. It flags state clauses ("the background does not carry over") as wasted words, because with no negative channel that sentence just re-describes the source image. It flags operation verbs - extract, cut out, re-composite, inpaint, paste - because those make the model perform a cut-and-paste and give you a collage with hard edges and mismatched light. Then the multi-image rules: mention two or more and it wants an attribution sentence ("environment only from image 2"), and if your first sentence names an image it warns you, since whatever you name first gets treated as the canvas. Last one is my favourite: if you write "keep the skin texture unchanged" and then describe four more texture details in the same breath, it points out that you're asking a re-render to preserve a face you just told it to redraw.

    Use <imageN> tags with 目标模型 = flux2-dev and it tells you that's Qwen syntax. On Qwen-Image-2.1 it leaves them alone.

    Outputs

    检查报告 is the report text - displayed in the node itself (it's an output node, so it runs even with nothing wired downstream) and printed to the console. 文件路径 is the saved check-<model>-<timestamp>.txt under ComfyUI/output/workflow_llm/, with your original prompt appended.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/DarthVanDerLimdr/comfyui-prompt-skill.git
    

    Restart ComfyUI. The pack declares one dependency, requests, and only the optimizer needs anything at all - in the shipped code even that goes through stdlib urllib, so the checker is genuinely zero-setup. No model to download, no skill folder to place - the rules are in the Python file.

    Where it gets things wrong

    It's regex, not comprehension. The lighting check passes if it finds light, sun, shadow, kelvin, or a bare k anywhere in your lowercased text - so look at the sky satisfies it. Negation detection is a substring scan, so the odd innocent word can trip it. Treat every line as "check this yourself," not "the machine has ruled."

    And the word-count band is written for flux2-dev only. Point it at qwen-image-2-1 and you still get the filler, lighting, camera, and reference-image checks, but no length verdict - the Qwen budget lives in the optimizer, not here.

    The good workflow is a loop: draft, run the checker, fix what it flagged, generate. If you also run the optimizer node, check its output too - an LLM on a 300-word budget can still hand you something worth a second pass.

    Category提示词工具

    Inputs (2)

    NameTypeDefaultDescription
    提示词STRING—
    目标模型COMBOflux2-dev2 options: flux2-dev, qwen-image-2-1

    Outputs (2)

    NameTypeDescription
    检查报告STRING—
    文件路径STRING—