Nodes/ComfyUI-FunPack/FunPack LTXAV Scene Chain Sampler
ComfyUI Node

FunPack LTXAV Scene Chain Sampler

Samples multi-entry scene conditioning as a smooth LTXV/LTXAV continuation chain. Use with FunPack Studio split-by-transitions output.

By digital-garbage·Created about a year ago·Updated 24 days ago· 16
FunPack LTXAV Scene Chain Sampler
  • model
  • vae
  • positive
  • negative
  • sampler
  • sigmas
  • latent_template
  • latent
  • images
  • status
  • scene_count
  • scene_report
  • scene_boundaries
seed1
num_frames_per_scene97
frame_overlap16
cfg1.0
max_scenes8
use_same_seedfalse
carry_i2v_guidesfalse
mid_scene_guidefalse
mid_scene_guide_strength0.25
embed_guidancefalse
embed_guidance_strength0.020
score_sliderfalse
score_slider_strength1.00
transition_duration16
decode_tile_size0
decode_noise_scale0.000
decode_timestep0.050
embed_guidance_sourcerelative
joyai_memoryfalse
joyai_memory_size7
joyai_fix_frames3
joyai_frame_selectcenter
joyai_memory_strength0.30
joyai_audio_memoryfalse
v2a_grad_scale1.00
refinement_key_input
funpack_scene_guides
funpack_scene_anchors
funpack_scene_media_refs
alg_blur_guidesfalse
bounded_attention_enabledfalse
output_guidancefalse
output_guidance_strength0.020
dynashiftfalse
dynashift_strength0.30
dynashift_threshold0.60
alg_guide_blur_strength2.0
alg_guide_blur_sigma_threshold0.975
identity_transfer_enabledfalse
identity_projectorNone
source_id2
phase_scale1.0
id_strength1.0
arcface_modeauto_adjust
debug_logfalse
carry_overlap_through_anchorfalse
plateau_cachefalse
plateau_cache_threshold0.975
taste_nearest_promptfalse
CategoryFunPack/Sampling

Inputs (56)

NameTypeDefaultDescription
modelMODEL
vaeVAE
positiveCONDITIONING
negativeCONDITIONING
samplerSAMPLER
sigmasSIGMAS
seedINT10–18446744073709550000
latent_templateLATENT
num_frames_per_sceneINT971–4096
frame_overlapINT160–512Pixel frames copied from the previous scene into the next chunk and preserved during denoising. 0 disables overlap blending entirely. WARNING: combining frame_overlap=0 with carry_i2v_guides=True is confirmed to produce bad results — use only for testing.
cfgFLOAT1.00–100
max_scenesINT8
use_same_seedBOOLEANfalseUse the first provided scene seed for every scene. Off uses per-scene metadata seeds or seed + scene index.
carry_i2v_guidesBOOLEANfalseCarry protected frames from latent_template noise_mask into each continuation chunk as a style guide.
mid_scene_guideBOOLEANfalseExperimental: append the middle frame of the previous scene as a guide for the current scene via LTX guide attention. Helps maintain character positioning across scenes.
mid_scene_guide_strengthFLOAT0.250.25–0.5Guide attention strength for mid-scene anchor. 0.25 is the minimum — below that audio degrades and character appearance drifts. Above 0.35 causes spatial conflicts when scene composition shifts.
embed_guidanceBOOLEANfalseApply the Refiner's learned quality direction at each denoising step, not just once before sampling. Requires refinement_key_input and enough liked generations to have a direction. Adds ~20-30% inference overhead.
embed_guidance_strengthFLOAT0.0200.005–0.1Per-step nudge strength toward the liked conditioning direction. Keep small — the direction is applied at every step so it compounds. 0.01-0.03 is typical.
score_sliderBOOLEANfalseFreeSliders-style taste guidance in SCORE space. Instead of nudging the conditioning once (embed_guidance), it runs 3 forward passes on quality-phase steps — base, taste+, taste- — and steers the noise prediction along eps_+ minus eps_-. Stronger, prompt-faithful taste push; ~2x cost on late steps. Uses the same learned direction + source + refinement_key_input as embed_guidance (needs 3+ liked generations). Contrastive pair: once 3+ disliked/awful gens are rated, the minus pole switches from a mirror of liked to the real learned BAD direction, so the axis becomes good-vs-bad and actively steers away from what produced rated-bad gens. Video-only (audio unaffected).
score_slider_strengthFLOAT1.000–3Slider amount (eta). How hard to push the noise prediction along the learned taste axis. 1.0 is a clear, safe push; raise toward 3.0 for a stronger effect (paper's saturation range). 0 = off.
transition_durationINT160–128Extra pixel frames of fade beyond the blend zone on each side of a scene boundary. 0 = disable all transition effects.
decode_tile_sizeoptINT00–4096Tile size for VAE decode (0 = no tiling). Set to e.g. 512 if decode OOMs.
decode_noise_scaleoptFLOAT0.0000–1Noise injected at VAE decode to restore fine detail/grain (the LTX VAE decoder is itself a tiny diffusion model). 0 = off (clean decode). ~0.025 is a gentle detail restore. Applied to this node's IMAGES decode only.
decode_timestepoptFLOAT0.0500–1Decode timestep fed to the VAE decoder when decode_noise_scale > 0. ~0.05 adds subtle detail; higher gives the decoder more freedom (more deviation from the latent).
embed_guidance_sourceoptCOMBOrelativeWhich learned direction embed_guidance steers toward. Relative: this prompt's liked direction (needs refinement_key_input). Absolute: the global, prompt-agnostic taste direction the Refiner accumulates across all prompts — works with no key.
joyai_memoryoptBOOLEANfalseJoyAI-Echo cross-shot memory bank. Generalizes mid_scene_guide from one anchor to a managed set of clean prior-shot frames injected into each scene via LTX guide attention, so character/scene identity carries across the whole chain (JoyAI-Echo's story-level consistency). The first joyai_fix_frames scenes are pinned permanently as a global anchor; the rest is a rolling most-recent window capped at joyai_memory_size. Supersedes mid_scene_guide when on. Video memory only; pair it with joyai_audio_memory for the soundtrack.
joyai_memory_sizeoptINT71–32Max total memory entries injected per scene (JoyAI default 7). Higher = stronger long-range consistency but more guide tokens and slower scenes.
joyai_fix_framesoptINT30–16Number of opening scenes pinned permanently in the bank as a global anchor (JoyAI default 3). They are never pruned; entries beyond them are a rolling most-recent window.
joyai_frame_selectoptCOMBOcenterWhich frame of each finished scene to store in the bank (JoyAI default 'center').
joyai_memory_strengthoptFLOAT0.300.25–10Guide-attention strength for each memory frame. 0.25 floor as mid_scene_guide (below it audio degrades and identity drifts). Uncapped at the top: 0.25-0.5 is the audio-safe band, higher values push identity harder but may degrade audio/over-constrain motion.
joyai_audio_memoryoptBOOLEANfalseJoyAI-Echo PAIRED AUDIO memory. Alongside each video memory frame, pin the prior shot's clean audio latent into the audio stream so voice/timbre/ambience carry across shots the way the face now does. Deliberately breaks the audio pass-through invariant — off by default. Requires joyai_memory on; no effect on single-stream (video-only) LTXV.
v2a_grad_scaleoptFLOAT1.000–4JoyAI-Echo video->audio coupling. Scales the model's trained video-to-audio cross-attention so the carried audio tracks the new shot's visuals (JoyAI uses 2.0). 1.0 = native model behavior (no change, zero overhead); 0.0 = audio ignores video this run. Only applies when joyai_audio_memory is on.
refinement_key_inputoptSTRINGConnect to the same refinement key as your V2 Refiner. When wired, the sampler writes carry_i2v_guides, frame_overlap, and scene count into the refinement state so the Refiner can reason about what changed between rated runs.
funpack_scene_guidesoptSTRINGOptional JSON from Movie Editor when guide_settings.stack_enabled: per-scene guide lists with source, frame_idx, apply_at, strength. When empty, carry_i2v_guides uses the Studio default (scene 1 template at frame 0).
funpack_scene_anchorsoptSTRINGOptional JSON map of scene_index → {filename, strength} for mixed-source i2v anchors (LTXVImgToVideoInplace starting latent). Distinct from i2v guides.
funpack_scene_media_refsoptSTRINGOptional media_ref → filename map for image-type i2v guides in custom guide stacks.
alg_blur_guidesoptBOOLEANfalseEXPERIMENTAL: extends ALG (see the sampler's alg_enabled) from just the i2v anchor to also blur newly-appended guide-attention frames this scene (mid_scene_guide / carry_i2v_guides-as-guide / configured per-scene guides / JoyAI memory), for the same early steps. Standalone: works even with the sampler's alg_enabled off (anchor stays sharp), with its own alg_guide_blur_strength / alg_guide_blur_sigma_threshold controls below. Requires the FunPack Distilled Flow sampler; no effect if no guide frames were appended this scene.
bounded_attention_enabledoptBOOLEANfalseEXPERIMENTAL: Bounded Attention (arXiv:2403.16990) + Structured Diffusion Guidance (arXiv:2212.05032)-style exact split. Studio splits multi-sentence scene prompts by sentence count and encodes each half SEPARATELY (no shared tokenization, exact boundary), then this masks text cross-attention so the left half of the frame can only attend to subject-1's tokens and the right half only to subject-2's — aims to stop attribute/anatomy bleed between two figures in one frame. No-op on single-sentence prompts or single-subject scenes. Works on any sampler (model-level hook, not sampler-specific).
output_guidanceoptBOOLEANfalseEXPERIMENTAL: sibling of embed_guidance, but the learned quality direction is trained on and applied to the model's own predicted OUTPUT (x0_hat) instead of the input conditioning — a separate value function (needs its own 10+ rated generations to activate; see refinement key's *.x0_snapshot.pt / *.value_fn_x0.pt). Same near-zero mechanism as embed_guidance (one backward pass through a small MLP, no extra model forward pass), applied post-prediction rather than pre-input. Requires refinement_key_input. Cost unmeasured yet — treat as embed_guidance-shaped until benchmarked, not assumed cheaper.
output_guidance_strengthoptFLOAT0.0200.005–0.1Per-step correction strength applied to the model's predicted output. Same scale/units as embed_guidance_strength — start there and adjust.
dynashiftoptBOOLEANfalseEXPERIMENTAL DynaShift: a negative prompt at CFG=1, driven by YOUR bad ratings instead of text. Bad-outcome ratings ('Awful', 'Wrong appearance', and the quality-missing family: 'Missing quality' / '+details' / '+action' combos) store that run's video latent in a per-key negative bank; near-miss ratings with positive reward ('Missing details', 'Missing action') deliberately do NOT. During sampling, frames that start to look like a banked bad generation are steered away (projection removal) until the match drops below the threshold. Alignment-free in time (chain position / guide tails don't matter); negatives from a different resolution are skipped; each negative is weighted by prompt similarity so unrelated bad gens steer less. Requires refinement_key_input; silent until the bank has at least one entry. No extra model pass — near-zero overhead. Audio untouched.
dynashift_strengthoptFLOAT0.300.05–1Fraction of the matched negative component removed per fully-gated late step (accumulates over ~4 quality-phase steps). 0.3 is a gentle nudge; 1.0 removes the matched component outright each step.
dynashift_thresholdoptFLOAT0.600.3–0.95Frame-similarity gate: a current frame must match a banked negative frame above this cosine similarity before any steering applies. Steering strength ramps from 0 at the threshold to full at similarity 1.0, so it self-releases once the unwanted feature is gone. Lower = more aggressive (risks steering away from legitimately similar content).
alg_guide_blur_strengthoptFLOAT2.01–4Downsample factor for the guide-frame blur (alg_blur_guides). Higher = blurrier guide/JoyAI frames during the affected steps. Independent of the sampler's anchor alg_strength.
alg_guide_blur_sigma_thresholdoptFLOAT0.9750.5–0.999Guide frames stay blurred while sigma is above this value (the near-pure-noise steps), then swap to sharp. Higher = narrower blurred window. Independent of the sampler's anchor alg_sigma_threshold.
identity_transfer_enabledoptBOOLEANfalseEXPERIMENTAL Best-FaceID compatibility: full native port of the overlap+source_phase+ArcFace conditioning Best-FaceID-style identity LoRAs were trained on. Replaces Continuity's 'Identity pin' guide (Engine settings) with separate, non-rendered reference tokens (never blended into frame 0) plus optional ArcFace projector tokens on the text context. No-op without an identity pin image set. Load the LoRA itself the normal way (Models -> add a LoRA loader onto the model path).
identity_projectoroptCOMBONoneArcFace projector .safetensors (from models/loras). 'None' = overlap only (the projector is a weak secondary channel; the overlap latent carries the bulk of identity).
source_idoptFLOAT20–8source_phase segment id for the overlap reference tokens (ltx-trainer's overlap+source_phase convention used 2). 0 disables the RoPE rotation while leaving the overlap tokens active.
phase_scaleoptFLOAT1.00–4Multiplier on source_id before the RoPE rotation.
id_strengthoptFLOAT1.00–50Multiplies the ArcFace projector tokens (only when identity_projector is set). Weak channel; push high (5-20) to test, very high may add artifacts.
arcface_modeoptCOMBOauto_adjustauto_adjust: retry face detection with zoom-out/upscale, skip projector tokens if none found. as_is: detect on the image only. disable: skip ArcFace, use only the overlap latent.
debug_logoptBOOLEANfalsePrint per-scene identity-transfer shape/status logs to the console.
carry_overlap_through_anchoroptBOOLEANfalseWhen a scene switches to its own i2v anchor (funpack_scene_anchors — a different reference image/character than the previous scene), still carry frame_overlap latent frames from the previous scene's tail into the frames right after the anchor image, instead of the default hard cut with no carried context. Preserves background/environment continuity through an anchor change (e.g. a Best-FaceID identity_transfer scene swapping the reference face mid-chain). The anchor image's own leading frame is never touched by the carried tail. No effect on scenes without a per-scene anchor.
plateau_cacheoptBOOLEANfalseEXPERIMENTAL speed (MixCache/Chorus-family step-caching, adapted to LTX2.3's distilled schedule): the near-pure-noise plateau steps (sigma above plateau_cache_threshold) carry almost no signal, so the model's output barely changes across them. This computes the full transformer forward once at the top of the plateau, then REUSES that output for the remaining plateau steps instead of recomputing — skipping those transformer passes entirely. On the default 8-step schedule (sigmas 1.0→0.975 are the plateau) that's ~3-4 of 8 forwards skipped. DETERMINISTIC given seed (no diversity/rating impact, safe in Batch Training) but an APPROXIMATION — validate A/B before trusting on final renders. Note: much of wall-clock time is outside the sampler (encode/decode), so sampler speedup ≠ total speedup. Off by default. UNVALIDATED LIVE.
plateau_cache_thresholdoptFLOAT0.9750.5–0.999Steps whose sigma is at or above this value count as the reusable plateau (matches the alg_guide_blur_sigma_threshold convention). Higher = fewer steps cached (safer, less speedup); lower = more steps cached (faster, more approximation). 0.975 catches the documented near-pure-noise plateau (schedule steps 1-5) while leaving structure formation (sigma 0.909 onward) fully computed. Only used when plateau_cache is on.
taste_nearest_promptoptBOOLEANfalseEXPERIMENTAL: source embed_guidance / score_slider from the taste direction learned on the prompts NEAREST this scene's prompt, instead of the single global liked-direction average. On every liked rating the Refiner records (prompt fingerprint -> that run's liked direction); with this on, each scene retrieves the similarity-weighted direction of its closest matches (a forest prompt pulls what worked on forests, not the mean across all prompts). Non-parametric retrieval — no extra model forward, just a cosine lookup + vector mean, and it can't collapse into a spurious attractor the way a value function can. Falls back to the global liked direction when no rated prompt is close enough (or the index is empty). Only affects embed_guidance / score_slider; needs refinement_key_input (or embed_guidance_source=absolute). UNVALIDATED LIVE.

Outputs (6)

NameTypeDescription
latentLATENT
imagesIMAGE
statusSTRING
scene_countINT
scene_reportSTRING
scene_boundariesSTRING