HYWorld2 Klein World Expansion (experimental)
Expanding your world with a ComfyUI model of your choice (experimental)
- workspace
- memory_bank
- trajectory_set
- model
- clip
- vae
- memory_bank
- info
The "(experimental)" in the name is doing a lot of honest work. HYWorld2 Klein World Expansion is an alternative to the main World Expansion node that trades the fixed WorldStereo model for your ComfyUI model - it takes plain MODEL, CLIP, and VAE sockets, so you can drive the expansion with any checkpoint you have installed. The name references the Flux-Klein-style reference-latent approach it borrows: condition on a keyframe, generate the extended view, keep it consistent.
Why would you want that? The main expansion path is locked to WorldStereo, which the author himself called heavy and dated. This node is the community-friendly escape hatch: if you already run Flux or Klein models and want to try expanding the scene with one, this is where you plug it in. The cost is that it's marked experimental for a reason, and the results will be as consistent as whatever model you supply.
How it works
From the changelog, it runs a Flux/Klein-style reference-latent pipeline over selected HYWorld2 trajectory keyframes and writes reusable per-trajectory result videos. It then normalizes those outputs back into the memory bank so generated frames, camera intrinsics, and point grids stay aligned even when the output resolution differs from the original trajectory render size. It keeps its own state file (hyworld2_klein_expansion_state.json) so previously-generated results and seeds are reused instead of regenerated.
The sampling knobs are the familiar Comfy ones: steps (default 4 - low, because this is reference-latent conditioning where you don't need long schedules), cfg (default 1.0), sampler_name (euler - the only choice, so don't hunt for more). input_megapixels (default 1) and resolution_steps control how the keyframe is scaled before conditioning. frames_per_trajectory (default 3) is how many output frames per trajectory, use_context_image feeds the previous frame as context for consistency, and result_name defaults to klein9b-memory-lora - a hint at the intended use (building training data, e.g. for a LoRA).
The inputs that matter
workspace,memory_bank,trajectory_set, plusmodel/clip/vae- all required. Pick your checkpoint here.positive_prompt- default is the wonderfully literal "Reconstruct image based on image2".steps/cfg- the defaults are tuned for the reference-latent style; don't crank them to SDXL habits.
Outputs
memory_bank- updated, exactly like the main expansion node.info- JSON.
Install & troubleshooting
Shared pack install: ComfyUI Manager (search HY-World 2.0) or clone + pip install -r requirements.txt + python install.py (which builds the vendored gsplat fork - keep only that one installed, not upstream gsplat). The "Klein" name doesn't mean this pack ships a Klein model - you bring the checkpoint. It does lean on the worldgen path that needs the recast navmesh wheel from install.py, and it needs a GPU with room for your diffusion model plus the memory bank, so on a 16 GB card keep the model small and input_megapixels modest.
Expect experimental behavior: this is the newest node in the pack (added in 1.5.1), so if expansion looks inconsistent or the state file gets you results you didn't expect, the state file is the first thing to clear - delete hyworld2_klein_expansion_state.json in the scene dir to force a re-run.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| workspace | HYWORLD2_WORKSPACE | — | |
| memory_bank | HYWORLD2_MEMORY_BANK | — | |
| trajectory_set | HYWORLD2_TRAJECTORY_SET | — | |
| model | MODEL | — | |
| clip | CLIP | — | |
| vae | VAE | — | |
| positive_promptopt | STRING | Reconstruct image based on image2 | — |
| negative_promptopt | STRING | — | |
| result_nameopt | STRING | klein9b-memory-lora | — |
| stepsopt | INT | 41–4096 | — |
| cfgopt | FLOAT | 1.00–100 | — |
| sampler_nameopt | COMBO | euler | 1 options: euler |
| input_megapixelsopt | FLOAT | 1.000.01–16 | — |
| resolution_stepsopt | INT | 11–256 | — |
| frames_per_trajectoryopt | INT | 31–64 | — |
| use_context_imageopt | BOOLEAN | true | — |
| seedopt | INT | 10–2147483647 | — |
| max_trajectoriesopt | INT | 00–100000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| memory_bank | HYWORLD2_MEMORY_BANK | — |
| info | STRING | — |