WanVideo Latent Injector
The 'stronger effects' path
- model
- main_latent
- injection_latent
- model
The plain WanVideoActivationEditor injects text conditioning - the 5120-dim embedding of your injection prompt - into selected blocks. This node injects latent conditioning instead: the model's own evolved representations of your prompts, captured after a few transformer blocks have already processed them. The pitch is that latent-space injection should hit harder, because it's speaking the model's internal language rather than re-encoding text at the edge.
You don't feed it prompts. You feed it two LATENT_EMBEDS objects produced by WanVideoLatentEncoder - main_latent and injection_latent, both required. Then the usual suspects: injection_strength (0–1, default 0.5) and block_activations (the 40-char string, from WanVideoBlockActivationBuilder). It measures the difference between your two latents and prints it to the console - that's your instant sanity check that the encoder actually preserved more than the projection did.
Output is a single model, with a latent_injection config stored in transformer_options for the patcher to apply during generation. Single output, straight to the sampler.
The honest caveats
Three things to keep in your head, because this is one of the pack's half-finished corners:
- It's config-plus-hope. Like several nodes in this pack, the injector writes its configuration into
transformer_optionsand relies on the patcher honoring it during generation. TheWanVideoLatentEncoderandLatentInjectorarticles both note the enforcement lives on the WanVideoWrapper side of the pipe, and that side is still catching up. "Should produce much stronger effects" is the intent, not the guaranteed outcome. - Garbage in, garbage out. The encoder's latents are simulations - it steps the blocks against faked random video-token states, not your actual latents. So the injector's "latent" is a kind of latent, and if the encoder returns an error or a degenerate capture, the injector quietly passes the model through unchanged (it prints "Invalid latent embeddings" and hands back the model). Check for that message.
- Pair, don't mix. Feed it raw
WANVIDEOTEXTEMBEDSinstead ofLATENT_EMBEDSand it'll complain or misbehave. Encode both prompts with the samecapture_after_blockssetting so they're comparable.
Install
Same pack, WanVideoWrapper first:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper # required first
git clone https://github.com/fblissjr/ComfyUI-WanActivationEditor
cd ComfyUI-WanActivationEditor && pip install -r requirements.txt
Restart ComfyUI (ComfyUI Manager: search "ComfyUI-WanActivationEditor"). If your generation shows no difference and the console is quiet, walk the ladder the README lays out: this is rung three of four, after the Embedding Amplifier and Projection Booster - for most people, the amplifier alone is the 90% solution, and this node is for when you genuinely need to push further.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | WANVIDEOMODEL | — | |
| main_latent | LATENT_EMBEDS | — | |
| injection_latent | LATENT_EMBEDS | — | |
| injection_strength | FLOAT | 0.500–1 | — |
| block_activations | STRING | 0000000000000000000000000000000000000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | WANVIDEOMODEL | — |