Nodes/DOGMA Nodes/DOGMA Insegne - Popup e prompt per elemento
ComfyUI Node

DOGMA Insegne - Popup e prompt per elemento

The popup where you rewrite the sign text and pick what gets rendered

By axior·Created 6 months ago·Updated 2 days ago· 2
DOGMA Insegne - Popup e prompt per elemento
  • proposals
  • approved_jobs
  • approved_mask
  • report
◄show_popuptrue►

A vision model has just looked at every candidate sign in your photograph, decided which ones are real signage, and written an edit instruction for each. Some of those instructions are good. Some are the model confidently misreading a 1970s shopfront. This node is where you fix that before it costs you a render.

It takes the proposal bundle, shows you a card per element - the crop with the mask tinted cyan, the model's proposed prompt, its confidence and its stated reason - and lets you tick the ones you want and edit their prompts inline. What comes out is an approved job bundle plus a single combined mask of everything approved, at the original image resolution.

How it works

With show_popup on and jobs present, the node saves an audit card per job through ComfyUI's preview mechanism, builds a payload with each element's ID, label, image, prompt, default selection state, reason and proposed text, registers it under a random token, and pushes a frontend event. Then it waits, checking for interruption every 200 ms, until the select route receives a choice. The choice is validated hard: every submitted ID must be in the allowed set, IDs must be unique, and every prompt must be non-empty and under 5000 characters. Prompts get replaced with your edits, and every selected item is marked approved.

The combined mask is the union of the native-resolution masks of the approved elements, composited with a maximum. That mask is your receipt and your safety net - the render stage checks afterwards that pixels outside it are untouched, and the report line here says exactly that: "Pixel esterni alla maschera finale conservati."

With show_popup off, the node skips the interaction and simply keeps the elements that were already auto-approved by the prepare stage. Useful for batch runs; also useful because the popup blocks the queue, and its IS_CHANGED returns NaN when the popup is on so it will always re-run rather than replaying an old answer.

Inputs and outputs

  • proposals (DOGMA_SIGN_JOBS) - from DOGMASignPrepareV125.
  • show_popup (on) - the interaction switch.

Outputs: approved_jobs (DOGMA_SIGN_JOBS, into DOGMASignRenderV125), approved_mask (MASK), and report (STRING), which is just the count of approved elements plus the guarantee line.

Install

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

Or ComfyUI Manager → DOGMA Nodes, then restart. scipy>=1.10 is the pack's only pip dependency. The popup itself is drawn by the pack's JavaScript extension and talks to its own route, so it needs a browser session attached to the same ComfyUI origin - and it will hang on the wait loop if you queue headless. Cancel aborts cleanly.

How to actually use the popup

Read the reason field first. It is short and in Italian, and it is the model telling you why it said yes - "proposta non valida: verifica la maschera" means it could not defend the call at all, which usually means the mask landed on something that is not a sign. Then look at proposed_text, the exact replacement wording it would put on the surface.

Prompt hygiene here is worth thirty seconds. Ask for the specific thing you want visible, in the language and period you want, and do not ask the model to invent history - the art direction string the plan carries already tells it not to fabricate place names, and you should not undo that by writing one in. If a sign is unreadable in the source, the honest move is a short plausible generic wording, not a confident restoration of something nobody can read.

Uncheck anything you are unsure about. A rejected element is free; a rendered wrong sign has to be re-rendered, and the compositing guarantee only protects the pixels outside the mask - inside it, whatever you asked for is what you get.

CategoryDOGMA/Insegne 1.0.25

Inputs (2)

NameTypeDefaultDescription
proposalsDOGMA_SIGN_JOBS—
show_popupBOOLEANtrue—

Outputs (3)

NameTypeDescription
approved_jobsDOGMA_SIGN_JOBS—
approved_maskMASK—
reportSTRING—