Nodes/ComfyUI_HYWorld2/HYWorld2 Klein World Expansion (experimental)
ComfyUI Node

HYWorld2 Klein World Expansion (experimental)

Expanding your world with a ComfyUI model of your choice (experimental)

By AHEKOT·Created 4 months ago·Updated about a month ago· 74
HYWorld2 Klein World Expansion (experimental)
  • workspace
  • memory_bank
  • trajectory_set
  • model
  • clip
  • vae
  • memory_bank
  • info
positive_promptReconstruct image based on image2
negative_prompt
result_nameklein9b-memory-lora
steps4
cfg1.0
sampler_nameeuler
input_megapixels1.00
resolution_steps1
frames_per_trajectory3
use_context_imagetrue
seed1
max_trajectories0

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, plus model / 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.

CategoryVNCCS/HYWorld2

Inputs (18)

NameTypeDefaultDescription
workspaceHYWORLD2_WORKSPACE
memory_bankHYWORLD2_MEMORY_BANK
trajectory_setHYWORLD2_TRAJECTORY_SET
modelMODEL
clipCLIP
vaeVAE
positive_promptoptSTRINGReconstruct image based on image2
negative_promptoptSTRING
result_nameoptSTRINGklein9b-memory-lora
stepsoptINT41–4096
cfgoptFLOAT1.00–100
sampler_nameoptCOMBOeuler1 options: euler
input_megapixelsoptFLOAT1.000.01–16
resolution_stepsoptINT11–256
frames_per_trajectoryoptINT31–64
use_context_imageoptBOOLEANtrue
seedoptINT10–2147483647
max_trajectoriesoptINT00–100000

Outputs (2)

NameTypeDescription
memory_bankHYWORLD2_MEMORY_BANK
infoSTRING