MinusZone - TrainToolsDebug
Pretty-print any config object in your graph
- object
- debug
MZ_TrainToolsDebug is the debugging escape hatch this pack ships for itself - and honestly, for you. This pack's whole architecture is built on passing around opaque custom objects: workspace_config, train_config, advanced_config are all dicts wearing custom types, and ComfyUI shows you nothing about their contents. When a train run behaves mysteriously, this node is how you look inside.
It takes any object (* type - the AlwaysEqualProxy trick means it accepts literally anything and doesn't care what type the other end claims) and pretty-prints it as formatted text, Python's pprint under the hood. Output is a STRING called debug, which you can show with a text display node or just read from the node's output.
The inputs that matter
object- whatever you want to inspect. Wire theworkspace_configfrom an InitWorkspace node, thetrain_configfrom MZ_KohyaSSUseConfig, or theadvanced_configfrom either AdvConfig node. Because it accepts anything, you can also use it on plain strings and numbers to see what actually flowed through.index- the power feature. A dot-separated path into the object:"train_config.learning_rate"prints just that field,"0.lora_name"digs into a list/dict at key 0. Great for confirming one value without drowning in the whole dump.indent,depth,width,sort_keys,underscore_numbers- pprint formatting knobs. The defaults (2, 5, 80, sorted, underscored) are fine;depthis the one to raise if a nested config prints as....
How to use it
The classic debugging loop with this pack: something's off in training → wire MZ_TrainToolsDebug onto the train_config (or the workspace_config) → run the graph → read the dump → find the field that's empty or wrong (the classic: dataset_config pointing at a stale path, or network_weights set when you wanted a fresh run). Then fix it upstream and remove the debug node. It's a diagnostic tool, not a permanent graph citizen, though plenty of people leave it hanging off the config nodes permanently - it's cheap and it's the only window into these custom types.
Install
Same as everything else in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/MinusZoneAI/ComfyUI-TrainTools-MZ
# restart ComfyUI
Or ComfyUI Manager → search ComfyUI-TrainTools-MZ.
A note on expectations: this node shows you the config the pack built, but it won't tell you whether that config is right for kohya - for that you compare against sd-scripts docs or the template JSONs in the pack's configs/kohya_ss_lora/ folder, which are the ground truth for what fields the trainer actually reads. And because the pack runs training in-process, a debug node won't catch kohya's own argument errors - those still land in the ComfyUI console. Use this node for "what is the pack about to do," and the console for "why did it blow up."
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| object | * | — | |
| indent | INT | 2 | — |
| depth | INT | 5 | — |
| width | INT | 80 | — |
| compact | COMBO | enable | 2 options: enable, disable |
| sort_keys | COMBO | enable | 2 options: enable, disable |
| underscore_numbers | COMBO | enable | 2 options: enable, disable |
| index | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| debug | STRING | — |