ComfyUI Node

DGLS Swapping Loader

A ComfyUI node in loaders with 10 inputs and 1 output.

By obisin·Created 12 months ago·Updated 11 months ago· 14
DGLS Swapping Loader
  • model
  • layers
  • model
prefetch1
cpu_threadingfalse
cuda_streamsfalse
cuda_graphsfalse
lora_size_mb0
verbosefalse
gpu_layer_indices
cast_target
Categoryloaders

Inputs (10)

NameTypeDefaultDescription
modelMODEL
layersLAYERS
prefetchINT10–100Number of layers to prefetch ahead of single layer transfer
cpu_threadingBOOLEANfalseEnable CPU threading for async CPU transfers (May cause instability on some systems)
cuda_streamsBOOLEANfalseEnable CUDA streams for copy-compute overlap (needs more VRAM)
cuda_graphsBOOLEANfalseEnable CUDA graph optimization for GPU-resident layers
lora_size_mbINT00–10000Total size of all LoRAs in MB. Set to 0 if no LoRAs are used.
verboseBOOLEANfalseEnable verbose output with detailed timing and transfer information. This will slow down inference when on
gpu_layer_indicesoptSTRINGComma-separated list of layer indices to keep permanently on GPU (e.g., '0,1,2,14,18,19,20,21,22'). Overrides initial_gpu_layers and final_gpu_layers
cast_targetoptSTRINGCast FROM dtype TO dtype at start-up (e.g., f32 bf16) choices=[f32, bf16, f16, f8_e4m3, f8_e5m2, nf4, fp4] WARNING: don't cast to f8/fp4 here unless your kernels support it

Outputs (1)

NameTypeDescription
modelMODEL