ComfyUI/comfy
Jedrzej Kosinski d7706091ae Add Select Model/CLIP/VAE Device passthrough nodes
Replace the per-loader device widgets removed in the previous commit
with three small passthrough selector nodes registered under
advanced/multigpu:

- Select Model Device  (MODEL  in/out)  - options: default / cpu / gpu:N
- Select CLIP Device   (CLIP   in/out)  - options: default / cpu / gpu:N
- Select VAE Device    (VAE    in/out)  - options: default / gpu:N (no cpu)

Each node clones the inbound patcher (model.clone() / clip.clone() /
copy.copy(vae)+vae.patcher.clone()) and retargets load_device (and
offload_device for cpu / vae_offload_device for VAE).

Portability across machines with different GPU counts:
- VALIDATE_INPUTS returns True so an unknown gpu:N value (e.g. a
  workflow saved on a 2-GPU machine opened on a 1-GPU machine) does
  not error at validation time.
- At runtime, resolve_gpu_device_option(...) returns None for
  unknown options (with a warning), and each selector then logs a
  per-node info message and passes through unchanged, matching the
  no-op style used by MultiGPU CFG Split's
  "No extra torch devices need initialization..." log.

Also adds comfy.model_management.get_gpu_device_options_no_cpu() which
the VAE selector uses; on a single-GPU box this collapses to just
["default"], which is fine.

Amp-Thread-ID: https://ampcode.com/threads/T-019e52b4-31ee-72cd-996b-64ecd9420e13
Co-authored-by: Amp <amp@ampcode.com>
2026-05-22 21:39:18 -07:00
..
audio_encoders
background_removal Add support for BiRefNet background remove model (CORE-46) (#12747) 2026-05-08 17:59:24 +08:00
cldm
comfy_types
extra_samplers
image_encoders feat: Support MoGe (CORE-168) (#13878) 2026-05-15 10:34:56 +08:00
k_diffusion feat: Support HiDream-O1-Image (CORE-187) (#13817) 2026-05-11 20:35:53 -07:00
ldm Merge remote-tracking branch 'origin/master' into worksplit-multigpu 2026-05-21 12:17:59 -07:00
sd1_tokenizer
t2i_adapter
taesd Add high quality preview support for Flux2 latents (#13496) 2026-04-29 19:37:30 -04:00
text_encoders Support Stable Audio 3 model. (#14010) 2026-05-20 11:34:22 -04:00
weight_adapter
bg_removal_model.py Fix BiRefNet issue (#13966) 2026-05-19 05:03:22 +08:00
cli_args.py Merge remote-tracking branch 'origin/master' into worksplit-multigpu 2026-05-21 12:17:59 -07:00
clip_config_bigg.json
clip_model.py
clip_vision_config_g.json
clip_vision_config_h.json
clip_vision_config_vitl_336_llava.json
clip_vision_config_vitl_336.json
clip_vision_config_vitl.json
clip_vision_siglip2_base_naflex.json
clip_vision_siglip_384.json
clip_vision_siglip_512.json
clip_vision.py
conds.py
context_windows.py feat: Context windows - add causal_window_fix to improve blending of context windows (CORE-100) (#13563) 2026-05-05 16:40:53 -07:00
controlnet.py Free QwenFunControlNet base_model reference in cleanup 2026-05-21 11:35:54 -07:00
deploy_environment.py Add deploy environment header (Comfy-Env) to partner node API calls (#13425) 2026-05-04 20:17:56 -07:00
diffusers_convert.py
diffusers_load.py
float.py
gligen.py
hooks.py Fix typos (#10986) 2026-05-08 17:14:45 +08:00
latent_formats.py Support Stable Audio 3 model. (#14010) 2026-05-20 11:34:22 -04:00
lora_convert.py
lora.py Multi-threaded load of models from disk (big load time speedups & Offload to disk) (CORE-43,CORE-152,CORE-164,CORE-165,CORE-117) (#13802) 2026-05-20 17:03:58 -07:00
memory_management.py memory_management: replace thread refusal with mutex 2026-05-23 01:00:30 +10:00
model_base.py Support Stable Audio 3 model. (#14010) 2026-05-20 11:34:22 -04:00
model_detection.py Support Stable Audio 3 model. (#14010) 2026-05-20 11:34:22 -04:00
model_management.py Add Select Model/CLIP/VAE Device passthrough nodes 2026-05-22 21:39:18 -07:00
model_patcher.py Merge remote-tracking branch 'origin/master' into worksplit-multigpu 2026-05-21 12:17:59 -07:00
model_prefetch.py prefetch: guard against no offload (#13703) 2026-05-04 12:56:05 -07:00
model_sampling.py feat: Support HiDream-O1-Image (CORE-187) (#13817) 2026-05-11 20:35:53 -07:00
multigpu.py Defer @pollockjj's tiled-VAE and UPSCALE_MODEL MultiGPU lanes (#14066) 2026-05-22 16:44:29 -07:00
nested_tensor.py
ops.py Multi-threaded load of models from disk (big load time speedups & Offload to disk) (CORE-43,CORE-152,CORE-164,CORE-165,CORE-117) (#13802) 2026-05-20 17:03:58 -07:00
options.py
patcher_extension.py
pinned_memory.py Multi-threaded load of models from disk (big load time speedups & Offload to disk) (CORE-43,CORE-152,CORE-164,CORE-165,CORE-117) (#13802) 2026-05-20 17:03:58 -07:00
pixel_space_convert.py
quant_ops.py Enable triton comfy kitchen via cli-arg (#12730) 2026-05-03 14:07:21 -04:00
rmsnorm.py feat: Gemma4 text generation support (CORE-30) (#13376) 2026-05-02 22:46:15 -04:00
sample.py Initial work to make downscale_ratio_temporal work. (#13972) 2026-05-18 23:01:43 -04:00
sampler_helpers.py Merge remote-tracking branch 'origin/master' into merge-master-into-worksplit-multigpu 2026-05-19 21:43:51 -07:00
samplers.py Mark non-NVIDIA multigpu gaps with TODOs in _handle_batch 2026-05-21 12:47:43 -07:00
sd1_clip_config.json
sd1_clip.py
sd.py Defer @pollockjj's tiled-VAE and UPSCALE_MODEL MultiGPU lanes (#14066) 2026-05-22 16:44:29 -07:00
sdxl_clip.py
supported_models_base.py
supported_models.py Support Stable Audio 3 model. (#14010) 2026-05-20 11:34:22 -04:00
utils.py Defer @pollockjj's tiled-VAE and UPSCALE_MODEL MultiGPU lanes (#14066) 2026-05-22 16:44:29 -07:00