Nodes/Pseudocomfy/Unpack Model Snapshot
ComfyUI Node

Unpack Model Snapshot

Turns one JSON file into a whole graph's worth of wires

By Pseudotools·Created 2 years ago·Updated 19 days ago· 4
Unpack Model Snapshot
  • 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, or None entries 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's width/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 - always None. 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_msks are marked OUTPUT_IS_LIST, so they must connect to list-expecting inputs (forceInput + INPUT_IS_LIST on 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 ValueError if 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 × height from 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.depth is 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.

CategoryPseudocomfy/IO

Inputs (1)

NameTypeDefaultDescription
json_dataDICT

Outputs (9)

NameTypeDescription
mat_txtsSTRING
mat_imgsIMAGE
mat_msksMASK
env_sceneSTRING
env_styleSTRING
env_negativeSTRING
img_depthIMAGE
img_edgeIMAGE
img_styleIMAGE