KJNodes/ltxvgenerated

LTXV Chunk FeedForward(LTXVChunkFeedForward)

EXPERIMENTAL AND MAY CHANGE THE MODEL OUTPUT!! Chunks feedforward activations to reduce peak VRAM usage.

LTXV Chunk Feed Forward

model
model
chunks
2
dim_threshold
4096
KJNodes

Description

This node chunks the feedforward activations inside the LTXV model to reduce peak VRAM usage. EXPERIMENTAL AND MAY CHANGE THE MODEL OUTPUT!! Use with caution and verify results against the unmodified model. Splitting activations into smaller pieces allows processing larger resolutions or sequences without exceeding memory limits, but can alter numerical precision (especially in attention or normalization paths) and thus affect final output quality.

Inputs

InputTypeRequiredDefaultRangeTooltip
modelMODELYesThe LTXV model to modify.
chunksINTYes2[1, 100], step 1Number of chunks to split the feedforward activations into to reduce peak VRAM usage. Higher values reduce peak memory further but may increase runtime and alter outputs. A value of 1 disables chunking entirely.
dim_thresholdINTYes4096[0, 16384], step 256Dimension threshold above which to apply chunking. Only layers with hidden size greater than or equal to this threshold will be chunked. Set to 0 to chunk every layer (maximum memory saving, greatest risk of output change).

Outputs

OutputTypeDescription
modelMODELThe modified LTXV model with chunked feedforward activations applied according to the given parameters.

Usage Notes

  • This node is intended for advanced users who need to fit very large LTXV model variants or high-resolution generation workflows into limited VRAM.
  • Because chunking changes the order of operations inside the feedforward block, the numerical results are not bit‑identical to the unpatched model. Always test outputs on representative prompts before relying on the chunked version for production.
  • dim_threshold allows you to restrict chunking to the largest (most memory‑hungry) layers. For typical LTXV models, setting dim_threshold to 4096 chunks only the largest layers, balancing memory savings and output fidelity.
  • Increasing chunks beyond 8–16 usually gives diminishing memory returns and can increase overhead; 2–8 is a practical range for most use cases.
  • If you experience unexpected artifacts or out‑of‑memory errors, try lowering chunks or raising dim_threshold.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
LTXV Chunk FeedForward (LTXVChunkFeedForward) - ComfyUI-KJNodes | ComfyUI Wiki