KJNodes/wangenerated

Wan ChunkFeedForward(WanChunkFeedForward)

Its core principle is to break down the large, memory-intensive computational processes within the model into multiple smaller chunks for sequential processing.

Wan Chunk Feed Forward

model
model
chunks
2
dim_threshold
4096
KJNodes

The Wan ChunkFeedForward node. Its core principle is to split the model's internal large, memory-intensive computation processes into multiple smaller chunks for sequential processing.

The Wan ChunkFeedForward node reduces peak VRAM usage by processing model feedforward activations in chunks. It is particularly suitable for handling high-resolution images or complex models.

Node Functionality

Its core principle is to split the model's internal large, memory-intensive computation processes into multiple smaller chunks (Chunks) for sequential processing. When the model's internal dimension exceeds the user-set threshold, Wan ChunkFeedForward automatically applies this chunking strategy. This avoids VRAM insufficiency caused by excessive single computation loads, enabling large models or high-load tasks to run under limited VRAM conditions.

Use Cases

When you frequently encounter "Out of Memory" errors while generating images with high-resolution models, you can try integrating this node. When building complex workflows involving multiple large models in series, using Wan ChunkFeedForward helps stabilize the process and prevent mid-flow crashes. For users who need to run advanced large models on GPUs with smaller VRAM, this node provides a viable optimization path.

Notes

Please note that this node is marked as "EXPERIMENTAL". Its output results may undergo unforeseen changes. It is recommended to use it with caution in critical or production tasks. Typically, start with a smaller number of chunks (e.g., 2 or 3) and adjust the dim_threshold parameter based on task requirements and VRAM conditions to balance VRAM savings and computational efficiency.

The Wan ChunkFeedForward node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…