Nodes/ComfyUI_HYWorld2/HYWorld2 Prepare WorldMirror Batch
ComfyUI Node

HYWorld2 Prepare WorldMirror Batch

Packing your memory bank into the exact format WorldMirror wants

By AHEKOT·Created 4 months ago·Updated about a month ago· 74
HYWorld2 Prepare WorldMirror Batch
  • memory_bank
  • images
  • camera_poses
  • camera_intrinsics
  • worldmirror_batch
  • info

Some nodes do the thinking, and some nodes just shuffle paperwork so the thinking can happen. HYWorld2 Prepare WorldMirror Batch is paperwork. Its whole job is to take a memory_bank and reformat it into the batch of images, camera poses, and intrinsics that the WorldMirror reconstruction node expects - in the exact order WorldMirror writes its depth files, because downstream alignment sorts by image/camera id.

You need this because the pack's custom HYWORLD2_MEMORY_BANK is its own thing, and the WorldMirror model wants a plain tensor batch plus a cameras file. This node is the adapter between the two. It's small, it has no tunables, and it's the thing standing between you and the actual reconstruction.

How it works

From the source, the node reads the memory bank and constructs:

  • images - the batched frames WorldMirror will reconstruct from.
  • camera_poses - the C2W (camera-to-world) pose tensor for each frame.
  • camera_intrinsics - the focal-length / projection tensor for each frame.
  • worldmirror_batch - the combined struct that also tracks memory_bank, world_mirror_dir, and the name map.

The comment in the code is the whole mechanism: "WorldMirror writes depth_NNNN by sorted image/camera id. Keep the tensor batch, cameras.json, files, and name_map in that exact same order." If the ordering drifted, the depth files would silently pair with the wrong views. So the node is careful, sorted, and boring on purpose.

Inputs and outputs

One required input, one required output that matters:

  • memory_bank (required) - from HYWorld2 Memory Bank.
  • worldmirror_batch - this is the one you wire into VNCCS_WorldMirrorV2_3D (or the equivalent reconstruction node) and into HYWorld2 Memory Alignment afterwards.
  • images, camera_poses, camera_intrinsics - also exposed as plain tensors, in case you want to inspect or rewire them.
  • info - JSON.

Install & troubleshooting

Pack install is the shared song: ComfyUI Manager (search HY-World 2.0) or git clone + pip install -r requirements.txt + python install.py (the last step builds the vendored gsplat fork and navmesh wheel - don't skip it, don't install upstream gsplat alongside). The reconstruction stages that follow this node are where the heavy model downloads happen - WorldMirror models come down from Hugging Face automatically on first use (roughly 5 GB for the current model).

There isn't much that can go wrong in this node - it's an adapter. The failures happen around it: if the memory bank is empty or its trajectory set never rendered, you'll get empty batches or a hard error from the downstream reconstruction. If you're seeing the classic "separate walls with seams" result later, that's a WorldMirror assembly quality problem, not this node's - the author's own tests show flat single images work well while multi-camera panorama assembly is where the pipeline is still rough.

CategoryVNCCS/HYWorld2

Inputs (1)

NameTypeDefaultDescription
memory_bankHYWORLD2_MEMORY_BANK

Outputs (5)

NameTypeDescription
imagesIMAGE
camera_posesTENSOR
camera_intrinsicsTENSOR
worldmirror_batchHYWORLD2_WORLDMIRROR_BATCH
infoSTRING