Nodes/DOGMA Nodes/DOGMA LazyText v56.7
ComfyUI Node

DOGMA LazyText v56.7

Don't caption a slot with no masks

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA LazyText v56.7
  • masks
  • STRING
text

The sibling of DOGMALazyImageV567, doing the same trick on the text side. Its job: if this category slot ended up with no approved masks, don't run the vision model - return a placeholder string instead. Given that the captioning VLM is usually the most expensive text-side step in a DOGMA graph, this is a real saving, not an optimisation for its own sake.

Why it matters

Phase 3 asks a VLM to describe each crop it's about to re-render. Crops exist per instance, per category, per image. Run that across a batch and the captioning pass becomes the bottleneck long before the diffusion pass does - which is exactly the complaint the pack author was already addressing at the workflow level, where one VLM instance is now reused sequentially across an ordered image list instead of being reloaded per image.

LazyText is the coarse half of that economy. No masks for a slot means no crops, which means no captioning, and the node makes ComfyUI act on that instead of evaluating the caption node anyway and throwing the result away.

How it works

Standard lazy-input pattern, same shape as its image twin:

def check_lazy_status(self, masks, text=None):
    return ['text'] if masks.numel() and bool((masks >= .5).any()) and text is None else []

def choose(self, masks, text=None):
    return (str(text) if masks.numel() and bool((masks >= .5).any())
            else 'INACTIVE SLOT: no category; caption and diffusion not executed.',)

Live masks → the node requests text, ComfyUI computes the upstream caption branch, and that string is passed through. Dead slot → nothing is requested, the caption node never runs, and the output is a fixed explanation string.

That fixed string is worth knowing verbatim, because it's designed to be read in a report: INACTIVE SLOT: no category; caption and diffusion not executed. It's not an empty string. It's a sentence that tells you, three hours later when you're reading logs, that this slot was deliberately skipped rather than broken.

Inputs and outputs

  • masks - this slot's approved masks. Same tensor you feed DOGMALazyImageV567.
  • text - lazy STRING, the caption for this slot. Normally from the caption chain fed by DOGMAChunkPromptV566 or a VLM caption node.
  • STRING out - either the caption or the placeholder.

Wire the output wherever the prompt for this slot's masked pass goes. Because both paths return a real string, downstream nodes don't need to know whether the slot was skipped - which is the entire trick, and the reason "lazy plumbing" beats "conditionally bypassed nodes" in a graph you have to run unattended.

Install

comfy node install comfyui-dogma-nodes
# or
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
pip install -r ComfyUI-DOGMA-Nodes/requirements.txt

Then restart and load a current DOGMA graph rather than hand-adding this node to an older one. The pack needs no model downloads, but the phase-3 graphs assume you've got a vision-language model wired up (DOGMA's own references use Qwen3-VL via comfyui_vlm_nodes) and the SAM 3 nodes ComfyUI ships in core.

Gotchas

A placeholder that reaches the sampler is worse than no placeholder. If you wire this output into a positive conditioning by mistake on a live slot you'll notice immediately; on a dead slot it's invisible, because that slot never samples. That's the trap: the "don't caption nothing" node quietly produces a sentence that looks like a prompt, so if you ever change the graph so a previously-dead slot samples, you're conditioning on INACTIVE SLOT: .... Read it in reports, don't feed it to a CLIP encode.

Empty is defined as all-zero, at 0.5. A mask holding three pixels of a distant pedestrian counts as live and will trigger the caption. On street scenes with many tiny detections, expect more captioning than you'd guess - the geometry guard and audit are the filters that actually shrink the list.

It doesn't know about the diffusion side. This node skipping the caption doesn't mean the paired DOGMALazyImageV567 will skip the render; each one checks its own masks. Give both the same masks and they agree. Give them masks from different points in the chain and you get a caption without a render, or a render with a placeholder prompt.

CategoryDOGMA/v56.7

Inputs (2)

NameTypeDefaultDescription
masksMASK
textSTRING

Outputs (1)

NameTypeDescription
STRINGSTRING