Skip to content

v1.2.5 — target_latent: pre-encode the pixel path

Choose a tag to compare

@lbouaraba lbouaraba released this 29 Jul 08:17
· 2 commits to main since this release

First outside code contribution — thanks @ethanfel!

Added

target_latent input on the patch node (#15): wire the same latent you feed KSampler.latent_image and the pixel path VAE-encodes the source at node-execution time instead of on the first sampling step.

Why you want this: without it, the first pixel-path encode runs mid-sampling, and ComfyUI's memory manager can evict part of the resident diffusion model to make room for the VAE — nothing reloads it, so every remaining step streams weights from CPU. Only VRAM-tight setups hit this, which is why the slowdown reports were inconsistent. Wiring target_latent restores the normal VAEEncode → KSampler order. It's optional — unwired, behavior is unchanged (the console prints a hint).

See the new README section "Pixel path and VRAM" for details and the console messages that tell you which path you got.

Fixed

  • Pre-encode console messages report resolutions in pixels, not latent units.