Nodes/ComfyUI-WanActivationEditor/WanVideo Latent Injector
ComfyUI Node

WanVideo Latent Injector

The 'stronger effects' path

By fblissjr·Created about a year ago·Updated about a year ago· 9
WanVideo Latent Injector
  • model
  • main_latent
  • injection_latent
  • model
injection_strength0.50
block_activations0000000000000000000000000000000000000000

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:

  1. It's config-plus-hope. Like several nodes in this pack, the injector writes its configuration into transformer_options and relies on the patcher honoring it during generation. The WanVideoLatentEncoder and LatentInjector articles 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.
  2. 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.
  3. Pair, don't mix. Feed it raw WANVIDEOTEXTEMBEDS instead of LATENT_EMBEDS and it'll complain or misbehave. Encode both prompts with the same capture_after_blocks setting 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.

CategoryWanVideoWrapper/Advanced

Inputs (5)

NameTypeDefaultDescription
modelWANVIDEOMODEL
main_latentLATENT_EMBEDS
injection_latentLATENT_EMBEDS
injection_strengthFLOAT0.500–1
block_activationsSTRING0000000000000000000000000000000000000000

Outputs (1)

NameTypeDescription
modelWANVIDEOMODEL