Skip to content

sd: support for CLIP and VAE on different devices#2184

Open
wbruna wants to merge 3 commits intoLostRuins:concedo_experimentalfrom
wbruna:kcpp_sd_multi_device_backend
Open

sd: support for CLIP and VAE on different devices#2184
wbruna wants to merge 3 commits intoLostRuins:concedo_experimentalfrom
wbruna:kcpp_sd_multi_device_backend

Conversation

@wbruna
Copy link
Copy Markdown

@wbruna wbruna commented May 3, 2026

Support for placing CLIP or VAE on separate devices (e.g. diffusion on Vulkan0, VAE on Vulkan1). It also enables keeping the diffusion model itself on CPU.

The first two commits adapt the C++ code: the interface receives device numbers instead of booleans, with -1 for "main device" and -2 for "CPU", and the backend includes a global config to choose which model gets which device. The last commit changes the sdclipgpu and sdvaecpu boolean parameters to accept "CPU", "main" or a device number.

Tested on Vulkan with my GPU and iGPU. Seems to work fine with command-line and config settings; however, I wasn't able to fully test the launcher, because there doesn't seem to be a way to select a discrete GPU and an iGPU through it (so I likely got its 1-based indexes wrong).

@wbruna wbruna force-pushed the kcpp_sd_multi_device_backend branch from e1210e2 to 1517922 Compare May 4, 2026 00:55
@wbruna wbruna force-pushed the kcpp_sd_multi_device_backend branch from 1517922 to 197cc2f Compare May 4, 2026 10:23
@wbruna wbruna marked this pull request as ready for review May 4, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant