Nodes/DOGMA Nodes/DOGMA V50 Tile VLM Instruction
ComfyUI Node

DOGMA V50 Tile VLM Instruction

The prompt that stops your tile refiner inventing windows

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA V50 Tile VLM Instruction
    • instruction
    project_context

    This is the smallest node in the pack and arguably the most reusable one outside it. One string in, one string out, no model, no settings. What it produces is a prompt you hand to a vision-language model - and the prompt is doing one very specific job: forcing the VLM to describe what's in this tile instead of what it thinks the photo is about.

    Reach for it when you're restoring a photo in tiles. Tile-by-tile refinement is the standard trick for putting real detail back into a scan or an old JPEG, and its classic failure is invention: the refiner sees "wall texture" and obligingly adds windows, adds grout, sharpens a face into a slightly different face. A VLM prompt per tile that only names what's visibly there is how you keep the pass honest.

    What the instruction actually demands

    The generated text asks the model to look at exactly one tile and return one line starting with PROMPT:, ideally 3–10 words, main visible subject first, relationship included only if it's visually obvious. The examples are shape-only - 1970s Italian cars on a road, grass lawn and concrete skylights - so you're not meant to reuse them, just to see the register it wants.

    Then come the prohibitions, and these are the interesting part:

    • Project context is usable as an adjective or style qualifier only, never as evidence that an object exists.
    • No restore, improve, detailed, high quality, damaged, blurry, grainy.
    • No OCR, no brands, no guessed objects.

    That second bullet is quiet sabotage-avoidance. Ask a refiner for "detailed restoration" of a tile and you've asked it for detail it can't verify exists - which is exactly when it starts making some up. And that first bullet is the one that saves you: if your project context says "1970s Italian street scene with cars", a model without that rule will happily report cars in a tile containing nothing but a wall, because you told it to be creative about context.

    Inputs and outputs

    project_context is a forceInput multiline string, which means it's a socket - wire a PrimitiveString into it, you can't type in the node. instruction is one STRING out, and it goes into whatever VLM node you run (the pack's own info strings name it "Qwen" throughout, so Qwen3-VL-class models are the intended consumer).

    That's the entire interface. The node does not iterate tiles, does not batch, and does not see the image. The loop is yours: one call per tile, per-tile prompt back into your refiner.

    If you're already running the pack, DOGMAV50PromptClean is the other half of this pattern - it takes the VLM's reply, scrapes the PROMPT: line back out, strips quotes, and truncates anything past 16 words so a chatty model can't drift into a paragraph.

    Install

    Manager → search DOGMA Nodes, or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
    

    Restart, and search the node menu for "tile VLM" - it sits in category DOGMA/v50. Zero third-party dependencies; the pack runs on PyTorch and core ComfyUI only.

    Two things that will annoy you

    You can't edit the prompt. The template lives in the Python source, not in a widget, so tuning the wording means editing dogma_semantic_v5641.py - and the next pack update overwrites your edits. If you want to iterate on it, copy the text into your own String node and stop using this one. Nothing wrong with that; the interesting part was reading it once.

    Your whole project context is embedded in every tile call. It's whitespace-collapsed and pasted verbatim, so a three-paragraph context gets prepended to every single tile. That's slower VLM throughput and more surface area for the model to drift - write one line, like Milan, Italy, 1970s street photography.

    One thing that isn't a problem: an empty context. You just get a blank context field and the visible-content rules carry the weight.

    CategoryDOGMA/v50

    Inputs (1)

    NameTypeDefaultDescription
    project_contextSTRING

    Outputs (1)

    NameTypeDescription
    instructionSTRING