Nodes/ComfyUI-BFSNodes/LTXV Edit Anything Looping Sampler
ComfyUI Node

LTXV Edit Anything Looping Sampler

The full Edit Anything conditioning stack, chunked for long clips

By alisson-anjos·Created 5 months ago·Updated 10 days ago· 100
LTXV Edit Anything Looping Sampler
  • model
  • vae
  • noise
  • sampler
  • sigmas
  • guider
  • positive
  • negative
  • latents
  • editanything_module
  • ref_image
  • guide_frames
  • denoised_output
  • ref_image_preview
  • diff_vs_previous_run
temporal_tile_size80
temporal_overlap24
blend_overlaptrue
lora_name(none)
ref_resize_modepad_to_fit
ref_strength1.00
guide_strength1.00
role_strength1.0
adaln_scale2.00
enable_ic_loratrue
enable_role_embeddingfalse
enable_adalntrue
reapply_per_chunktrue
enable_visual_crossattntrue
ref_context_scale0.01
ref_token_scale0.25
ref_start_block12
ref_end_block35
ref_init_fromattn2
ref_init_seed42
ref_attn_lora_strength1.00
debug_eafalse

This is the flagship node in the pack, and it's genuinely dense - over twenty optional parameters - because it's doing three jobs at once. It's a custom sampler for LTXV Edit Anything LoRAs (the video_to_video_ref_adaln training strategy the whole pack is built around), it handles temporal tiling so you can sample clips longer than one chunk fits in memory, and it exposes every conditioning path the author's Edit Anything LoRAs can carry: IC-LoRA reference/guide tokens, a role-embedding bias, and AdaLN-style global appearance conditioning. If you've seen the author's LTX-2.3 Edit Anything LoRA doing background swaps and clothing replacement on Reddit, this sampler is the node underneath it.

Why "looping"

Instead of sampling your whole clip in one pass, it slices the video into temporal tiles (temporal_tile_size, default 80 pixel frames) with overlap between them (temporal_overlap, default 24), then blends the seams (blend_overlap, on by default) so a long generation doesn't need to fit entirely in memory at once. reapply_per_chunk decides whether the reference/guide tokens get re-appended on every chunk or only the first - leave it on unless you have a specific reason not to, since inheriting "no IC-LoRA append" on later chunks is a good way to lose identity partway through a clip.

The three conditioning paths, and what actually needs tuning

You load the LoRA either via lora_name directly or, as an alternative, via editanything_module - a sidecar object from this pack's LTXVEditAnythingModuleLoader node. Only use one at a time.

  • IC-LoRA sequence conditioning (enable_ic_lora, on by default): appends ref_image and optional guide_frames as clean conditioning tokens. ref_strength and guide_strength (0-1) control how much each contributes.
  • Role embedding (enable_role_embedding, off by default): injects a learned reference-role bias before patchify_proj. This one is genuinely LoRA-specific - the tooltip flags that the author's own stage2_ref_visual_adaln_crossattn checkpoint was trained with this disabled, so flipping it on for the wrong LoRA is a real footgun, not a safe default to just try.
  • AdaLN reference conditioning (enable_adaln, on by default, adaln_scale default 2): pools the reference image into a global style/appearance signal injected into LTXV's timestep path.
  • Visual cross-attention (enable_visual_crossattn, on by default): auto-detects ref_visual_proj/ref_attn LoRA keys and, if present, runs a separate cross-attention path with its own scale knobs (ref_context_scale, ref_token_scale), block range (ref_start_block/ref_end_block), and initialization mode (ref_init_from) - all of which the tooltips say must match the LoRA's training config exactly, particularly ref_init_from.

Outputs: denoised_output (latent, for your VAE decode), ref_image_preview, and diff_vs_previous_run - a debug string comparing this run against the last, handy while you're iterating on strength values.

Installing it, and getting the LoRA right

Search "ComfyUI-BFSNodes" in ComfyUI Manager, or install by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/alisson-anjos/ComfyUI-BFSNodes.git
cd ComfyUI-BFSNodes
pip install -r requirements.txt

Restart ComfyUI. The pack's own README points at the first public Edit Anything LoRA, edit_anything_reference_v0.1_r128_12000.safetensors - but the author (active on r/StableDiffusion, posting Edit Anything updates and workflows) had already shipped edit_anything_v1.1_r256.safetensors on their HuggingFace EditAnything repo by mid-2026, with real improvements to consistency and prompt adherence over the version the README names. Check for the newest file rather than trusting the README's version number literally. Put it under ComfyUI/models/loras/.

Where this actually breaks, from people who've used it

One recurring, confirmed issue: users running this sampler with the Edit Anything LoRA report a ghosting or "after-image" artifact - guide frames leaving a visible trail in the output. The author's own fix, straight from that thread: use the workflow bundled with the LoRA version you're on rather than an older one, keep LoRA strength at 1.0 (higher causes visual degradation, not better results), and delete any color-adjustment node sitting after VAE decode - that combination is what triggers it. Background and clothing replacement work well through this pipeline for video-to-video, but image-to-video support was reported as weaker in the same discussion, so don't be surprised if I2V results underperform V2V ones. And because this node auto-detects LoRA keys for the visual cross-attention path, a LoRA that's missing ref_visual_proj/ref_attn weights will just silently skip that path - if a setting doesn't seem to do anything, check debug_ea before assuming the node is broken.

CategoryLTXV/EditAnything

Inputs (34)

NameTypeDefaultDescription
modelMODEL
vaeVAE
noiseNOISE
samplerSAMPLER
sigmasSIGMAS
guiderGUIDERProvides CFG/STG sampling settings. Its conds are overridden per chunk.
positiveCONDITIONING
negativeCONDITIONING
latentsLATENT
temporal_tile_sizeINT808–1000Temporal tile size in pixel frames.
temporal_overlapINT240–256Temporal overlap in pixel frames.
blend_overlapBOOLEANtrue
lora_nameoptCOMBO(none)Edit Anything LoRA. Used to load role_embedding + ref_adaln_proj weights. Leave on (none) if passing editanything_module instead.
editanything_moduleoptLTXV_EA_MODULEAlternative to lora_name: sidecar module from LTXV Edit Anything Module Loader.
ref_imageoptIMAGEReference image (appearance anchor). Required for IC-LoRA ref tokens / AdaLN.
guide_framesoptIMAGEGuide video frames (structure/motion). VAE-encoded internally, then sliced per chunk.
ref_resize_modeoptCOMBOpad_to_fit3 options: pad_to_fit, center_crop, stretch
ref_strengthoptFLOAT1.000–1
guide_strengthoptFLOAT1.000–1
role_strengthoptFLOAT1.00–20
adaln_scaleoptFLOAT2.000–10
enable_ic_loraoptBOOLEANtrueAppend ref + guide_slice as IC-LoRA clean tokens per chunk.
enable_role_embeddingoptBOOLEANfalseSum role_embedding bias onto IC-LoRA ref tokens. Must match training config `use_visual_ref_role_embedding`. stage2_ref_visual_adaln_crossattn was trained with this DISABLED.
enable_adalnoptBOOLEANtrue
reapply_per_chunkoptBOOLEANtrueIf True: append ref + (sliced) guide tokens on every chunk. If False: only on chunk 0; later chunks inherit no IC-LoRA append.
enable_visual_crossattnoptBOOLEANtrueAuto-detect ref_visual_proj + ref_attn LoRA keys in the checkpoint and enable the visual cross-attention path (stage2_ref_visual_adaln_crossattn).
ref_context_scaleoptFLOAT0.010–2Scale for ref_attn output added to each block. Training default for video_to_video_ref_visual_adaln is 0.01 (very conservative).
ref_token_scaleoptFLOAT0.250–2Scale applied to projected visual memory tokens before cross-attn. stage2_ref_visual_adaln_crossattn was trained with 0.25.
ref_start_blockoptINT120–47First transformer block that consumes visual ref tokens (training default 12).
ref_end_blockoptINT350–47Last transformer block that consumes visual ref tokens (training default 35).
ref_init_fromoptCOMBOattn2How to initialize ref_attn before applying its LoRA. CRITICAL: must match the training config `init_ref_attn_from`. stage2_ref_visual_adaln_crossattn was trained with 'attn2'.
ref_init_seedoptINT42-1–2147483647Seed for random ref_attn init when ref_init_from='none'. Ignored otherwise.
ref_attn_lora_strengthoptFLOAT1.00-2–2Strength multiplier for the ref_attn LoRA deltas.
debug_eaoptBOOLEANfalse

Outputs (3)

NameTypeDescription
denoised_outputLATENT
ref_image_previewIMAGE
diff_vs_previous_runSTRING