Nodes/ComfyUI-Egregora-ARMD/🧩 Egregora Spatial Tensor Pack
ComfyUI Node

🧩 Egregora Spatial Tensor Pack

The advanced plumbing for injecting spatial data into ARMD at runtime

By lucasgattasΒ·Created 5 months agoΒ·Updated about a month agoΒ· 0
🧩 Egregora Spatial Tensor Pack
  • image_a
  • image_b
  • latent_a
  • latent_b
  • runtime_payload_adapter
β—„name_image_aspatial_image_aβ–Ί
β—„name_image_bspatial_image_bβ–Ί
β—„name_latent_aspatial_latent_aβ–Ί
β—„name_latent_bspatial_latent_bβ–Ί

Here's the honest version: if you're reading this because a beginner guide told you to install Egregora-ARMD, you almost certainly do not need Egregora Spatial Tensor Pack yet. This is one of the pack's three "runtime payload" nodes - advanced plumbing that lets you feed extra spatial data (images, latents) into the regional denoising engine mid-run. You'll reach for it only when you understand why, and the good news is it's easy to understand.

What "runtime payload adapter" means

When Egregora Adaptive Diffusion Apply runs, each denoising pass slices the latent into region crops and processes them in batches. The mixer can also inject extra per-region data into those passes - but it has a contract: anything you want injected has to come in as a runtime_payload_adapter that implements build_payload(latent, timestep, cond_dict). That adapter is the optional input on Adaptive Diffusion Apply. These pack/merge nodes exist to build that adapter without hard-coding one workflow's assumptions.

Egregora Spatial Tensor Pack builds an adapter that carries spatial tensors - IMAGE and LATENT data. The reason that's useful: the mixer checks whether a payload value is a spatial tensor and, if so, slices it to match each region batch's context bboxes using the same plan geometry that drives everything else. So a control-like image you pack here gets region-sliced in lockstep with the latent, which is how you'd get structural guidance (think ControlNet-flavored conditioning) into a regional run without fighting the pack's internals.

The inputs

Four string name fields and four optional tensors:

  • name_image_a, name_image_b, name_latent_a, name_latent_b - the keys your tensors travel under inside the payload. Defaults like spatial_image_a are fine until you need a specific key to match what the runtime expects.
  • image_a, image_b, latent_a, latent_b - the actual data. All optional; leave a slot empty and it simply doesn't get packed.

Output is a single runtime_payload_adapter.

A warning about ControlNet

The README is careful here and you should be too: ARMD can regionalize compatible spatial tensors and precomputed residual dictionaries, but it does not guarantee support for every native ControlNet chain - in particular, some Z-Image-specific ControlNet Union workflows need separate integration. So don't assume that packing a ControlNet output here makes it work; treat it as the pack's sanctioned route for spatial conditions and check whether your specific control chain is one of the compatible ones.

Installing

Same pack, same drill:

cd ComfyUI/custom_nodes
git clone https://github.com/lucasgattas/ComfyUI-Egregora-ARMD

restart, or install "ComfyUI-Egregora-ARMD" via ComfyUI Manager. No models to download; the dependencies are numpy, opencv-python, PyWavelets and torch. Like the whole pack - a small, honest, research-flavored family of nodes from Lucas Gattas (mrgattax) - this node is cleanly scoped: pack spatial data, hand the adapter to Adaptive Diffusion Apply, and let the mixer handle slicing. If you don't need structural guidance per region, skip it without guilt.

CategoryEgregora-ARMD

Inputs (8)

NameTypeDefaultDescription
name_image_aSTRINGspatial_image_aβ€”
name_image_bSTRINGspatial_image_bβ€”
name_latent_aSTRINGspatial_latent_aβ€”
name_latent_bSTRINGspatial_latent_bβ€”
image_aoptIMAGEβ€”
image_boptIMAGEβ€”
latent_aoptLATENTβ€”
latent_boptLATENTβ€”

Outputs (1)

NameTypeDescription
runtime_payload_adapterEGREGORA_RUNTIME_PAYLOAD_ADAPTERβ€”