Show generated_user_rules.py
Actually look at the rules file before you trust it
- generated_user_rules.py
The whole rule pipeline in this pack - scan, save, merge - eventually lands in a file called generated_user_rules.py inside custom_nodes/ComfyUI_SaveImageWithMetaDataUniversal/saveimage_unimeta/defs/ext/. That's the file the save node loads at runtime, so it's the ground truth for what gets captured and what doesn't. Show generated_user_rules.py is just a way to read that file without leaving ComfyUI: it prints the current merged contents and hands them to you as a string.
That's the entire job. No inputs, one output. It exists because the author knows the rules file is where people go to debug "why didn't my metadata capture X" - and digging through your custom_nodes folder in a text editor is friction you don't need when the answer is two clicks away.
The output
One generated_user_rules.py STRING output containing the current rules module text. You can wire it into any text display or processing node in the graph. In practice the useful pattern is:
- Wire it to
Show Text (UniMeta)to see the rules on canvas, or - Wire it to
Save generated_user_rules.pyto round-trip an edited copy back to disk.
This is the node the README points at for the "scanner found my nodes but the rules look wrong" case: check the output here, adjust the capture paths for your node's sockets/fields, and save the corrected text with Save generated_user_rules.py. The loop is view → edit → save → re-test.
When you'll actually use it
Honestly? Not every session. Most of the time you run the scanner, save the rules, and never look at the file again. You reach for Show generated_user_rules.py in three situations:
- A field is missing. Your custom loader's model name isn't showing up in metadata. Pull the file, find the node's entry, see what the scanner guessed.
- After a pack update. If the save node logged a
[Metadata Loader]warning about stale rules, viewing the file shows you what's actually loaded (and itsRULES_VERSION) before you re-scan. - Before hand-editing. You want to tweak one rule by hand and keep the rest - view, edit, save via the companion node.
One thing to note: this node reads the current merged file, so if you changed rules via Save Custom Metadata Rules in this session, what you see here reflects that. And because it's a display node with no inputs, its output is stable until the file changes - no surprise reruns. It's a thin utility, but it's the one that turns the rules file from an opaque blob into something you can actually debug.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| generated_user_rules.py | STRING | — |