Unpack Model Snapshot
Turns one JSON file into a whole graph's worth of wires
- json_data
- mat_txts
- mat_imgs
- mat_msks
- env_scene
- env_style
- env_negative
- img_depth
- img_edge
- img_style
If Load Model Snapshot is the front door, Unpack Model Snapshot is the coat check. It takes the single json_data DICT that the loader read in and splits it into everything downstream actually works with: the per-material prompts, images, and masks as lists, plus the global environment prompts and the depth map. One JSON in, nine wires out, and suddenly a file you couldn't feed to any ComfyUI node becomes a regional-prompting graph.
It handles two snapshot formats and detects which one it's looking at automatically. The legacy v0.1 format uses pmts_environment + map_semantic keys; the current format (v0.4/v0.5, the one the README recommends) uses global_guidance, regional_guidance, and spatial_guidance. Both must carry a pseudorandom_snapshot_version field - if it's missing, you get a hard KeyError, and if the version is below 0.1 you get an "unsupported version" error. The format you feed it is the format it handles; you don't need to convert anything.
The nine outputs
mat_txts- list of STRING: one prompt per material/region (may contain nulls, if a region is image-only).mat_imgs- list of IMAGE: decoded reference images for each region, orNoneentries where a region has text only.mat_msks- list of MASK: the per-region masks, decoded to[1, H, W]and resized to the snapshot'swidth/height.env_scene,env_style,env_negative- the three global prompt strings.img_depth- the decoded depth map as an IMAGE, sized to the snapshot.img_edge,img_style- alwaysNone. The README is upfront that edge and style guidance aren't implemented yet. Don't wire these and wonder why nothing renders.
The first three are the workhorses - they're exactly the lists PseudoApplyDenseDiffusionSDXL and PseudoApplyIPAdaperSDXL are built to consume.
Gotchas that will bite
- List outputs are lists.
mat_txts/mat_imgs/mat_msksare markedOUTPUT_IS_LIST, so they must connect to list-expecting inputs (forceInput+INPUT_IS_LISTon the Apply nodes). Dragging a list into a single-value socket is a classic wiring error. - Counts must match. The node validates that prompts and masks are the same length and raises
ValueErrorif not. A region in the snapshot with a mask but no text still counts - the entry just carries a null. - It resizes to the snapshot's declared dimensions. Your masks are forced to
width×heightfrom the JSON, regardless of their source pixel size. If the render comes out the wrong size, the fix is in the snapshot, not the node. - V0.4 requires depth.
spatial_guidance.depthis mandatory; a v0.4 snapshot without it throws.
It's the second half of the pipeline's reproducibility story: snapshot in, clean typed wires out. Install is pack-standard - clone Pseudocomfy into custom_nodes (or Manager → "Pseudocomfy") and restart; the node needs nothing but the diffusers dependency the README flags for Windows portable installs.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| json_data | DICT | — |
Outputs (9)
| Name | Type | Description |
|---|---|---|
| mat_txts | STRING | — |
| mat_imgs | IMAGE | — |
| mat_msks | MASK | — |
| env_scene | STRING | — |
| env_style | STRING | — |
| env_negative | STRING | — |
| img_depth | IMAGE | — |
| img_edge | IMAGE | — |
| img_style | IMAGE | — |