You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SD3.5 Large and Large Turbo: conditioning graph broken with --clip-on-cpu (t5 compute buffer size stays at 11.94 MB, output is pure noise) #1578
But then VRAM OOM occurs during diffusion model loading (15 GB required, 8 GB available).
SD3.5 Medium works correctly using GGUF from calcuis/sd3.5-medium-gguf with the same encoder files and same flags.
Expected behavior:--clip-on-cpu should allow running SD3.5 Large on systems with limited VRAM by keeping encoders in RAM while using GPU for diffusion steps.
It's a 16.5G model file. It would fail to load on most 8G GPUs, except Vulkan can spill it to system-shared VRAM. The problem is, on many systems Vulkan can cause issues when free VRAM is too low.
Another option could be limiting VRAM usage with --offload-to-cpu --max-vram -0.5.
I'd also suggest running with either--clip-on-cpu --vae-on-cpuor--offload-to-cpu. If only the diffusion model is on the GPU, --offload-to-cpu will increase RAM usage for no benefit.
All of this was done, including creating models from the original and using flags.
Look, we can try to guess what's happening on your system, but it'd be far more efficient if you gave us more information. I'd suggest running the smallest quant you can get with --verbose, and posting the output, so we can see how much memory it is trying to allocate. A verbose log from the successful calcuis/sd3.5-medium-gguf command would be useful, too.
log_large.txt log_medium.txt
SD3.5 Medium GGUF produces correct images with the same t5 compute buffer size: 11.94 MB and identity projection. SD3.5 Large GGUF produces pure noise. The difference is only in the diffusion model file.
SD3.5 Medium GGUF produces correct images with the same t5 compute buffer size: 11.94 MB and identity projection.
but apart from memory sizes and timings (which are naturally different), the clip and t5 compute buffer sizes and the 'identity projection' being mentioned are identical, so I don't think T5 itself has anything to do with this issue.
model.diffusion_model. usually is a tensor prefix on "complete" model files, that should be loaded with -m/--model instead of --diffusion-model. Your initial command did that:
sd-cli.exe -m sd3.5_large.safetensors
but it looks like this test was made with --diffusion-model instead:
Could you try again with -m, and post the log? It would also be helpful if you used --offload-to-cpu and --clip-on-cpu --vae-on-cpu consistently, to minimize the difference between the logs.
Thank you for the clarification. I ran the test with -m flag as requested, with --offload-to-cpu, --clip-on-cpu and --vae-on-cpu. The log is attached. The output is still pure noise (image attached).
Key observations from the log:
model_path is correctly set, diffusion_model_path is empty
VAE is included in the GGUF: VAE weight type stat: f32: 192 | q4_0: 52
All weights are in RAM: mmdit params backend buffer size = 4779.76 MB(RAM)
t5 compute buffer size: 11.94 MB remains the same as with SD3.5 Medium
Generation completes successfully but produces noise
SD3.5 Medium GGUF with identical flags produces correct images.
Activity
wbruna commentedon May 29, 2026
This one? https://huggingface.co/second-state/stable-diffusion-3.5-large-GGUF/blob/main/sd3.5_large.safetensors
It's a 16.5G model file. It would fail to load on most 8G GPUs, except Vulkan can spill it to system-shared VRAM. The problem is, on many systems Vulkan can cause issues when free VRAM is too low.
I'd suggest trying a smaller quant: https://huggingface.co/second-state/stable-diffusion-3.5-large-GGUF/tree/main , or create one from the original with e.g.
sd-cli.exe -M convert -m sd3.5_large.safetensors --type q5_1 -o sd3.5_large-Q5_1.gguf. Converting the T5 model may be useful too (fp8 tensors double in size when loaded).Another option could be limiting VRAM usage with
--offload-to-cpu --max-vram -0.5.I'd also suggest running with either
--clip-on-cpu --vae-on-cpuor--offload-to-cpu. If only the diffusion model is on the GPU,--offload-to-cpuwill increase RAM usage for no benefit.cupa9491-dev commentedon May 30, 2026
All of this was done, including creating models from the original and using flags.
wbruna commentedon May 30, 2026
Look, we can try to guess what's happening on your system, but it'd be far more efficient if you gave us more information. I'd suggest running the smallest quant you can get with
--verbose, and posting the output, so we can see how much memory it is trying to allocate. A verbose log from the successfulcalcuis/sd3.5-medium-ggufcommand would be useful, too.cupa9491-dev commentedon May 31, 2026
log_large.txt
log_medium.txt
SD3.5 Medium GGUF produces correct images with the same t5 compute buffer size: 11.94 MB and identity projection. SD3.5 Large GGUF produces pure noise. The difference is only in the diffusion model file.
wbruna commentedon May 31, 2026
Thanks. These are parts of the diff between the log files you've provided ('-' is medium, '+' is large):
Details
Details
You have mentioned
but apart from memory sizes and timings (which are naturally different), the clip and t5 compute buffer sizes and the 'identity projection' being mentioned are identical, so I don't think T5 itself has anything to do with this issue.
On the other hand, I see lots of these:
+[DEBUG] model.cpp:1193 - unknown tensor 'model.diffusion_model.(...)model.diffusion_model.usually is a tensor prefix on "complete" model files, that should be loaded with-m/--modelinstead of--diffusion-model. Your initial command did that:but it looks like this test was made with
--diffusion-modelinstead:[DEBUG] main.cpp:600 - SDContextParams { n_threads: 6, model_path: "", clip_l_path: "C:\sd-cpp\models\sd3\clip_l.safetensors", clip_g_path: "C:\sd-cpp\models\sd3\clip_g.safetensors", clip_vision_path: "", t5xxl_path: "C:\sd-cpp\models\sd3\t5xxl_fp8_e4m3fn.safetensors", llm_path: "", llm_vision_path: "", - diffusion_model_path: "C:\sd-cpp\models\sd3\sd3.5_medium-q5_0.gguf", + diffusion_model_path: "C:\sd-cpp\models\sd3\sd3.5_large-Q4_0.gguf", high_noise_diffusion_model_path: "", embeddings_connectors_path: "", vae_path: "C:\sd-cpp\models\sd3\diffusion_pytorch_model.safetensors",Could you try again with
-m, and post the log? It would also be helpful if you used--offload-to-cpuand--clip-on-cpu --vae-on-cpuconsistently, to minimize the difference between the logs.cupa9491-dev commentedon Jun 1, 2026
log_large_m.txt
Thank you for the clarification. I ran the test with -m flag as requested, with --offload-to-cpu, --clip-on-cpu and --vae-on-cpu. The log is attached. The output is still pure noise (image attached).
Key observations from the log:
model_path is correctly set, diffusion_model_path is empty
VAE is included in the GGUF: VAE weight type stat: f32: 192 | q4_0: 52
All weights are in RAM: mmdit params backend buffer size = 4779.76 MB(RAM)
t5 compute buffer size: 11.94 MB remains the same as with SD3.5 Medium
Generation completes successfully but produces noise
SD3.5 Medium GGUF with identical flags produces correct images.
Squashed 'ggml/' changes from e20c3a1..04b55bba