Description
Merges two VAEs by weighted-averaging their state dictionary weights. The ratio parameter controls the interpolation: 0.0 yields pure vae_1, 1.0 yields pure vae_2, and intermediate values produce a linear blend. Both VAEs must share the same architecture (matching state dict keys and tensor shapes) for the merge to succeed.
Inputs
| Name | Type | Default | Min | Max | Step | Description |
|---|---|---|---|---|---|---|
vae_1 | VAE | – | – | – | – | First VAE (contributes 1 - ratio to the blend). |
vae_2 | VAE | – | – | – | – | Second VAE (contributes ratio to the blend). |
ratio | FLOAT | 0.5 | 0.0 | 1.0 | 0.01 | Weight toward vae_2. 0.0 = all vae_1, 1.0 = all vae_2. |
Outputs
| Name | Type | Description |
|---|---|---|
| – | VAE | A new VAE whose weights are the element-wise weighted average of the two input VAEs. |
Usage Notes
- Both VAEs must have identical state dictionary keys and tensor shapes. If they differ (e.g., different model architectures, latent dimensions, or channel configurations), the node will raise an error.
- This is a simple linear interpolation of model weights, not a more sophisticated merging technique. It is useful for blending between different VAE finetunes or for testing smooth transitions in latent space behavior.
- The original input VAEs are not modified. A new VAE object is created with the interpolated weights.
- The
ratiostep of0.01allows fine-grained control; use the slider or type a value directly.
Comments
Sign in with GitHub to join the discussion.