Nodes/ComfyUI-JITBlockSwap/Block Swap (RAM Offload)
ComfyUI Node

Block Swap (RAM Offload)

Streams the first N transformer blocks from system RAM to the GPU on demand so models larger than VRAM can run. LoRA patches are baked in once at load time.

By lovemachine100·Created about a month ago·Updated 23 days ago· 6
Block Swap (RAM Offload)
  • model
  • MODEL
blocks_to_swap20
pin_memorytrue
Categoryadvanced/model

Inputs (3)

NameTypeDefaultDescription
modelMODEL
blocks_to_swapINT200–80Number of transformer blocks kept in system RAM and streamed to the GPU per forward pass. Raise if you still hit OOM. Automatically raised further when the resident part would not fit in VRAM.
pin_memoryBOOLEANtruePage-lock the CPU copies for faster PCIe transfers. Costs the same amount of non-swappable system RAM.

Outputs (1)

NameTypeDescription
MODELMODEL