HYWorld2 Memory Bank
The scene's long-term memory, and how HY-World2 stops worlds drifting apart
- workspace
- trajectory_set
- memory_bank
- info
- memory_images
World models have a fundamental problem: generate a scene, then generate more of it, and the second half forgets what the first half looked like. HYWorld2 Memory Bank is this pack's answer to that drift. It builds the memory bank that anchors every expansion step that comes after it - a collection of reference images, point clouds, and camera info that later stages use to stay geometrically consistent instead of slowly hallucinating the scene into something else.
It sits right after HYWorld2 Trajectories in the chain: Trajectories figures out where to look, and this node builds the persistent record of what you've seen. Everything downstream - Memory Alignment, World Expansion, the Klein variant, Prepare WorldMirror Batch - consumes this HYWORLD2_MEMORY_BANK.
How it works
Under the hood it initializes the PanoramaMemoryBank from the vendored HY-World worldgen source against your scene directory. It resolves the working image size automatically from the trajectory start frame (falling back to the panorama if there are no renders), then constructs the bank with a set of frame-count and point-count controls. nframe (0 means "use the default 21") is how many frames per trajectory the bank keeps; max_reference and align_nframe control how many reference frames it keeps around for alignment; downsampled_pts caps the point cloud (2M by default, up to 50M). The kb_anomaly_percentile (90) is an outlier filter for picking which keyframes make it into the bank.
It's a genuinely heavy step - on a big scene, building a bank with millions of points takes a while and chews VRAM. The author has been honest that this pack wants a lot of VRAM at decent resolutions.
The inputs that matter
workspaceandtrajectory_set- both required. The trajectory set must come from the same scene directory as the workspace, or the node refuses to run with a clear error.nframe- raise it if you see the world losing consistency across expansions; it costs memory.downsampled_pts- the main memory dial. Lower it for testing, raise it for quality.
Outputs
memory_bank(HYWORLD2_MEMORY_BANK) - intoMemory Alignment/World Expansion/Klein World Expansion/Prepare WorldMirror Batch.memory_images- a preview of the reference frames it selected; handy for sanity-checking that the bank picked good keyframes.info- JSON status.
Install & troubleshooting
Same pack install as the rest: ComfyUI Manager (search HY-World 2.0) or the git clone + pip install -r requirements.txt + python install.py route - the last step builds the vendored gsplat fork and navmesh wheel, don't skip it, and don't install upstream gsplat alongside it.
The two errors you'll actually see: "different scene directories" (you wired a trajectory set built from another workspace - rebuild or reconnect), and "requires completed HYWorld2 Trajectories base geometry" (Trajectories hasn't produced render results yet). If the bank looks wrong, check memory_images before touching the exotic knobs - nine times out of ten the issue is bad keyframe selection, and kb_anomaly_percentile is where you nudge it.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| workspace | HYWORLD2_WORKSPACE | — | |
| trajectory_set | HYWORLD2_TRAJECTORY_SET | — | |
| image_widthopt | INT | 00–8192 | — |
| image_heightopt | INT | 00–8192 | — |
| nframeopt | INT | 00–257 | — |
| max_referenceopt | INT | 81–64 | — |
| align_nframeopt | INT | 81–64 | — |
| downsampled_ptsopt | INT | 20000001–50000000 | — |
| kb_anomaly_percentileopt | FLOAT | 90.01–100 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| memory_bank | HYWORLD2_MEMORY_BANK | — |
| info | STRING | — |
| memory_images | IMAGE | — |