ComfyUI Node

UnpackImageParams

Unpacking the Image Params Wire

By Fictiverse·Created 3 years ago·Updated 29 days ago· 27
UnpackImageParams
  • params
  • image
  • width
  • height
  • megapixel
  • enabled

Fictiverse's LoadImageAdvanced hands you one fat wire of type IMAGE_PARAMS that's carrying way more than just pixels - the image, its width, its height, the target megapixel, and whether the loader was even enabled. UnpackImageParams is the node that unwraps that bundle back into sockets the rest of ComfyUI can actually use. Think of the two as a pair: LoadImageAdvanced packs, UnpackImageParams unpacks. You won't get far with one but not the other.

How it works

It takes a single IMAGE_PARAMS input and splits it into five outputs: image, width, height, megapixel, and enabled. Mechanically it's reading keys out of the dict that LoadImageAdvanced built - nothing magical, no file access, no model calls. The useful defensive bits are the fallbacks: if the packed image is missing, it substitutes a plain black 512×512 tensor so the image socket always has a valid value, and missing width/height default to 512, megapixel to 1.0, enabled to true. So this node never hands you a hole in the graph, even when the loader was switched off.

What you wire where

  • image → VAE Encode, or anywhere you'd normally send a Load Image output.
  • width and height → the Width/Height inputs on an Empty Latent Image. This is the payoff: because LoadImageAdvanced already rescaled the image to a target resolution, the latent you build from these numbers always matches the image exactly. No more eyeballing dimensions.
  • megapixel → handy for logging or for feeding a resize node the same target the loader used.
  • enabled → a BOOLEAN you can feed into conditional or switch logic. This is how a downstream node knows "the image branch is off, behave accordingly."

The inputs that matter are really just one: params (IMAGE_PARAMS). Plug LoadImageAdvanced's _ output into it.

The honest gotchas

Don't hand-build an IMAGE_PARAMS value yourself - the dict keys are internal to the pack, and while UnpackImageParams has defaults for everything, a hand-rolled bundle is a good way to get a surprise black 512×512 and wonder where your image went. Let the loader produce the wire.

Also note the fallback behavior cuts both ways. That black-tensor substitute is why the image socket stays "alive" when the loader is disabled - which is nice for keeping the graph runnable, but it means you can't tell from the image socket alone whether you're looking at a real image or a placeholder. That's exactly what the enabled output is for. If a workflow toggles LoadImageAdvanced off and you're seeing black frames downstream, check enabled rather than debugging your VAE.

Installing it

It ships in ComfyUI Fictiverse Nodes (the same pack as LoadImageAdvanced, which is the only thing that produces its input). Install via ComfyUI Manager - search ComfyUI Fictiverse Nodes - and restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Fictiverse/ComfyUI_Fictiverse

Then restart ComfyUI. Zero extra dependencies, no model downloads; the pack needs only what ComfyUI already ships.

CategoryFictiverse/Image

Inputs (1)

NameTypeDefaultDescription
paramsIMAGE_PARAMS

Outputs (5)

NameTypeDescription
imageIMAGE
widthINT
heightINT
megapixelFLOAT
enabledBOOLEAN