Repository navigation
Description
Git commit
commit f957fa3
Operating System & Version
Windows 10 Pro - 22H2
GGML backends
CUDA
Command-line arguments used
sd-cli.exe --diffusion-model models\unet\z-image-Q3_K_M.gguf --vae models\vae\flux_vae.safetensors --llm models\text_encoders\Qwen3-4B-Instruct-2507-Q4_K_M.gguf -p "A cinematic, melancholic photograph of a solitary hooded figure walking through a sprawling, rain-slicked metropolis at night. The city lights are a chaotic blur of neon orange and cool blue, reflecting on the wet asphalt. The scene evokes a sense of being a single component in a vast machine. Superimposed over the image in a sleek, modern, slightly glitched font is the philosophical quote: 'THE CITY IS A CIRCUIT BOARD, AND I AM A BROKEN TRANSISTOR.' -- moody, atmospheric, profound, dark academic" --cfg-scale 5.0 --offload-to-cpu --diffusion-fa -H 1024 -W 512 --vae-tiling
Steps to reproduce
Tested command (from documentation with added --vae-tiling, minus -v)
sd-cli.exe --diffusion-model models\unet\z-image-Q3_K_M.gguf --vae models\vae\flux_vae.safetensors --llm models\text_encoders\Qwen3-4B-Instruct-2507-Q4_K_M.gguf -p "A cinematic, melancholic photograph of a solitary hooded figure walking through a sprawling, rain-slicked metropolis at night. The city lights are a chaotic blur of neon orange and cool blue, reflecting on the wet asphalt. The scene evokes a sense of being a single component in a vast machine. Superimposed over the image in a sleek, modern, slightly glitched font is the philosophical quote: 'THE CITY IS A CIRCUIT BOARD, AND I AM A BROKEN TRANSISTOR.' -- moody, atmospheric, profound, dark academic" --cfg-scale 5.0 --offload-to-cpu --diffusion-fa -H 1024 -W 512 --vae-tiling
What you expected to happen
Getting the picture from documentation.
For example using Z-image-turbo (same command, only cfg 1.0 and a Q4_K version of the diffusion model):
What actually happened
Quantized version of Z-Image-base results in black pictures while Z-image-turbo works without issue.
Output of above command:
Preview using "proj" are also full black pictures.
Logs / error messages / stack trace
Base logs without debug:
[INFO ] ggml_extend.hpp:78 - ggml_cuda_init: found 1 CUDA devices:
[INFO ] ggml_extend.hpp:78 - Device 0: NVIDIA GeForce GTX 1060, compute capability 6.1, VMM: yes
[INFO ] stable-diffusion.cpp:260 - loading diffusion model from 'models\unet\z-image-Q3_K_M.gguf'
[INFO ] model.cpp:370 - load models\unet\z-image-Q3_K_M.gguf using gguf format
[INFO ] stable-diffusion.cpp:307 - loading llm from 'models\text_encoders\Qwen3-4B-Instruct-2507-Q4_K_M.gguf'
[INFO ] model.cpp:370 - load models\text_encoders\Qwen3-4B-Instruct-2507-Q4_K_M.gguf using gguf format
[INFO ] stable-diffusion.cpp:321 - loading vae from 'models\vae\flux_vae.safetensors'
[INFO ] model.cpp:373 - load models\vae\flux_vae.safetensors using safetensors format
[INFO ] stable-diffusion.cpp:337 - Version: Z-Image
[INFO ] stable-diffusion.cpp:365 - Weight type stat: f32: 390 | q3_K: 55 | q4_K: 303 | q5_K: 17 | q6_K: 58 | bf16: 272
[INFO ] stable-diffusion.cpp:366 - Conditioner weight type stat: f32: 145 | q4_K: 216 | q6_K: 37
[INFO ] stable-diffusion.cpp:367 - Diffusion model weight type stat: f32: 245 | q3_K: 55 | q4_K: 87 | q5_K: 17 | q6_K: 21 | bf16: 28
[INFO ] stable-diffusion.cpp:368 - VAE weight type stat: bf16: 244
[INFO ] stable-diffusion.cpp:735 - Using flash attention in the diffusion model
|====================> | 453/1095 - 218.63it/s←[K
|======================================> | 851/1095 - 233.73it/s←[K
|==================================================| 1095/1095 - 283.83it/s←[K
[INFO ] model.cpp:1629 - loading tensors completed, taking 3.86s (process: 0.00s, read: 3.06s, memcpy: 0.00s, convert: 0.19s, copy_to_backend: 0.00s)
[INFO ] stable-diffusion.cpp:876 - total params memory size = 8000.09MB (VRAM 8000.09MB, RAM 0.00MB): text_encoders 3555.38MB(VRAM), diffusion_model 4350.14MB(VRAM), vae 94.57MB(VRAM), controlnet 0.00MB(VRAM), pmid 0.00MB(VRAM)
[INFO ] stable-diffusion.cpp:945 - running in FLOW mode
[INFO ] stable-diffusion.cpp:3527 - sampling using Euler method
[INFO ] denoiser.hpp:494 - get_sigmas with discrete scheduler
[INFO ] stable-diffusion.cpp:3654 - TXT2IMG
[INFO ] ggml_extend.hpp:1862 - qwen3 offload params (3555.38 MB, 398 tensors) to runtime backend (CUDA0), taking 1.71s
[INFO ] ggml_extend.hpp:1862 - qwen3 offload params (3555.38 MB, 398 tensors) to runtime backend (CUDA0), taking 0.85s
[INFO ] stable-diffusion.cpp:3271 - get_learned_condition completed, taking 3226 ms
[INFO ] stable-diffusion.cpp:3382 - generating image: 1/1 - seed 42
[INFO ] ggml_extend.hpp:1862 - z_image offload params (4350.17 MB, 453 tensors) to runtime backend (CUDA0), taking 1.08s
|==================================================| 20/20 - 16.21s/it←[K
[INFO ] stable-diffusion.cpp:3424 - sampling completed, taking 324.51s
[INFO ] stable-diffusion.cpp:3435 - generating 1 latent images completed, taking 325.04s
[INFO ] stable-diffusion.cpp:3438 - decoding 1 latents
[INFO ] ggml_extend.hpp:1862 - vae offload params ( 94.57 MB, 138 tensors) to runtime backend (CUDA0), taking 0.07s
|==================================================| 21/21 - 1.64it/s←[K
[INFO ] stable-diffusion.cpp:3448 - latent 1 decoded, taking 13.10s
[INFO ] stable-diffusion.cpp:3452 - decode_first_stage completed, taking 13.10s
[INFO ] stable-diffusion.cpp:3762 - generate_image completed in 341.37s
[INFO ] main.cpp:421 - save result image 0 to 'output.png' (success)
Debug info:
[DEBUG] main.cpp:500 - version: stable-diffusion.cpp version unknown, commit f957fa3
[DEBUG] main.cpp:501 - System Info:
SSE3 = 1 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | AVX512_VBMI = 0 | AVX512_VNNI = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | VSX = 0 |
[DEBUG] main.cpp:502 - SDCliParams {
mode: img_gen,
output_path: "output.png",
verbose: true,
color: false,
canny_preprocess: false,
convert_name: false,
preview_method: none,
preview_interval: 1,
preview_path: "preview.png",
preview_fps: 16,
taesd_preview: false,
preview_noisy: false
}
[DEBUG] main.cpp:503 - SDContextParams {
n_threads: 6,
model_path: "",
clip_l_path: "",
clip_g_path: "",
clip_vision_path: "",
t5xxl_path: "",
llm_path: "models\text_encoders\Qwen3-4B-Instruct-2507-Q4_K_M.gguf",
llm_vision_path: "",
diffusion_model_path: "models\unet\z-image-Q3_K_M.gguf",
high_noise_diffusion_model_path: "",
vae_path: "models\vae\flux_vae.safetensors",
taesd_path: "",
esrgan_path: "",
control_net_path: "",
embedding_dir: "",
embeddings: {
}
wtype: NONE,
tensor_type_rules: "",
lora_model_dir: ".",
photo_maker_path: "",
rng_type: cuda,
sampler_rng_type: NONE,
flow_shift: INF
offload_params_to_cpu: true,
enable_mmap: false,
control_net_cpu: false,
clip_on_cpu: false,
vae_on_cpu: false,
flash_attn: false,
diffusion_flash_attn: true,
diffusion_conv_direct: false,
vae_conv_direct: false,
circular: false,
circular_x: false,
circular_y: false,
chroma_use_dit_mask: true,
qwen_image_zero_cond_t: false,
chroma_use_t5_mask: false,
chroma_t5_mask_pad: 1,
prediction: NONE,
lora_apply_mode: auto,
vae_tiling_params: { 0, 0, 0, 0.5, 0, 0 },
force_sdxl_vae_conv_scale: false
}
[DEBUG] main.cpp:504 - SDGenerationParams {
loras: "{
}",
high_noise_loras: "{
}",
prompt: "A cinematic, melancholic photograph of a solitary hooded figure walking through a sprawling, rain-slicked metropolis at night. The city lights are a chaotic blur of neon orange and cool blue, reflecting on the wet asphalt. The scene evokes a sense of being a single component in a vast machine. Superimposed over the image in a sleek, modern, slightly glitched font is the philosophical quote: 'THE CITY IS A CIRCUIT BOARD, AND I AM A BROKEN TRANSISTOR.' -- moody, atmospheric, profound, dark academic",
negative_prompt: "",
clip_skip: -1,
width: 512,
height: 1024,
batch_count: 1,
init_image_path: "",
end_image_path: "",
mask_image_path: "",
control_image_path: "",
ref_image_paths: [],
control_video_path: "",
auto_resize_ref_image: true,
increase_ref_index: false,
pm_id_images_dir: "",
pm_id_embed_path: "",
pm_style_strength: 20,
skip_layers: [7, 8, 9],
sample_params: (txt_cfg: 5.00, img_cfg: 5.00, distilled_guidance: 3.50, slg.layer_count: 3, slg.layer_start: 0.01, slg.layer_end: 0.20, slg.scale: 0.00, scheduler: NONE, sample_method: NONE, sample_steps: 20, eta: 0.00, shifted_timestep: 0),
high_noise_skip_layers: [7, 8, 9],
high_noise_sample_params: (txt_cfg: 7.00, img_cfg: 7.00, distilled_guidance: 3.50, slg.layer_count: 3, slg.layer_start: 0.01, slg.layer_end: 0.20, slg.scale: 0.00, scheduler: NONE, sample_method: NONE, sample_steps: 20, eta: 0.00, shifted_timestep: 0),
custom_sigmas: [],
cache_mode: "",
cache_option: "",
cache: disabled (threshold=1, start=0.15, end=0.95),
moe_boundary: 0.875,
video_frames: 1,
fps: 16,
vace_strength: 1,
strength: 0.75,
control_strength: 0.9,
seed: 42,
upscale_repeats: 1,
upscale_tile_size: 128,
}
[DEBUG] stable-diffusion.cpp:166 - Using CUDA backend
[INFO ] ggml_extend.hpp:78 - ggml_cuda_init: found 1 CUDA devices:
[INFO ] ggml_extend.hpp:78 - Device 0: NVIDIA GeForce GTX 1060, compute capability 6.1, VMM: yes
Additional context / environment details
Model sources:
- https://huggingface.co/unsloth/Z-Image-GGUF/blob/main/z-image-Q3_K_M.gguf
- https://huggingface.co/unsloth/Qwen3-4B-Instruct-2507-GGUF/blob/main/Qwen3-4B-Instruct-2507-Q4_K_M.gguf
- https://huggingface.co/black-forest-labs/FLUX.1-schnell/blob/main/vae/diffusion_pytorch_model.safetensors
Nividia-smi:
Thu Feb 5 14:48:09 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 581.80 Driver Version: 581.80 CUDA Version: 13.0 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Driver-Model | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce GTX 1060 WDDM | 00000000:01:00.0 Off | N/A |
| N/A 43C P8 2W / 78W | 0MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| No running processes found |
+-----------------------------------------------------------------------------------------+
Activity
nArn0 commentedon Feb 5, 2026
I LOVE sd.cpp and i am really grateful to be able to run Z-Image-turbo on my potato GPU and i didn't want to open a bug. I really tried as many parameters as possible to make Z-image-base works but it really don't want to generate anything else that a full black picture.
NB: I also use Z-Image-turbo with cfg 1.2 with success.
nArn0 commentedon Feb 5, 2026
PS: i also tried by using my own quantized version of the model using the same command i used with success for Z-image-turbo: https://huggingface.co/n-Arno/Z-Image-GGUF
[-][Bug][/-][+][Bug] Z-Image-base quantized versions yield black pictures[/+]JohnLoveJoy commentedon Feb 6, 2026
https://huggingface.co/leejet/Z-Image-GGUF
Try this GGUF - Q4.
wbruna commentedon Feb 6, 2026
ROCm works for me with the Q4 above, but I'm also getting fully black images on Vulkan (Linux+radv).
nArn0 commentedon Feb 6, 2026
Sadly, same results :-(
JohnLoveJoy commentedon Feb 6, 2026
I tested it with Windows, Vulkan API. 20 steps, CFG 4. Result: Garbled output.
pessimism commentedon Feb 6, 2026
Seems to be related to a very similar bug I responded to earlier: #1031
stduhpf commentedon Feb 6, 2026
@JohnLoveJoy can you share the command you've used to generate it? For some reason there's no metadata in the image you've shared.
JohnLoveJoy commentedon Feb 6, 2026
I used KoboldCPP with these settings. I can test it later with the latest SD.cpp file available if needed.
stduhpf commentedon Feb 6, 2026
@JohnLoveJoy Either it's driver-related or there is something wrong with sd.cpp integration in koboldcpp. I can't really reproduce it with sd.cpp.
(note that Z-Image is supposed to work with the original Qwen3-4B, witch is neither Qwen3-4B-Instruct nor Qwen3-4B-Base, but I don't think it should cause this kind of issue, the embeddings should be similar enough)
nArn0 commentedon Feb 6, 2026
Out of curiosity i tried jayn7 quants for base and turbo:
With the base one, result is a black image. With the turbo one, i got this:
It feels like something, somewhere, in the base image is not ok with the quant and results in values that leads to either NaN or a lot of 0 along the way.
nArn0 commentedon Feb 7, 2026
Thanks to cpu-offload and a whole lot of patience, i managed to run the test with the base bf16 checkpoint and got a result.
So, using the most basic of the conversion command, i started going done the line of available types.
Example of the conversion command used:
f16 (close to bf16 result i overwrote by mistake):
Q8_0 kinda worked:
Q5_0 started to die:
Q4_0 is dead:
piallai commentedon Feb 8, 2026
It seems like you are using CUDA 13 with a graphic card using a Pascal architecture, which is not managed anymore according to the compute capability matrix. Have you tried using CUDA 12.9 ?
dsignarius commentedon Feb 8, 2026
Linux/vulkan/radv
ggml_vulkan: 0 = AMD Radeon Graphics (RADV RENOIR) (radv) | uma: 1 | fp16: 1 | bf16: 0 | warp size: 64 | shared memory: 65536 | int dot: 0 | matrix cores: none
-W 512 -H 1024 -v -p "A cinematic, melancholic photograph of a solitary hooded figure walking through a sprawling, rain-slicked metropolis at night. The city lights are a chaotic blur of neon orange and cool blue, reflecting on the wet asphalt. The scene evokes a sense of being a single component in a vast machine. Superimposed over the image in a sleek, modern, slightly glitched font is the philosophical quote: 'THE CITY IS A CIRCUIT BOARD, AND I AM A BROKEN TRANSISTOR.' -- moody, atmospheric, profound, dark academic" --cfg-scale 5.0
F16

Q8_0

Q4_K_M

nArn0 commentedon Feb 9, 2026
I'll try downgrading back to older CUDA just in case.
nArn0 commentedon Feb 16, 2026
After properly removing everything Nvidia related via DDU, re-installing the latest driver and CUDA 12.9.1, nvidia-smi still report CUDA 13.0 but the detected CUDA toolkit is indeed 12.9.1.
The latest build crash right when started so a recompiled directly the main branch to make sure everything match with my env.
[DEBUG] main.cpp:515 - version: stable-diffusion.cpp version master-504-636d3cb, commit 636d3cbIn the end, still no luck :-(
EDIT: Z-Image-Turbo still works perfectly.
alex-ie commentedon Sep 3, 2026
Hi! I have been long since February (last post here) and no progress?
I will add my 5 cents. I have recently tried ZiB and noticed that "black square".
ZiT works always in my setups, but Z-Image-Base works only on CPU or Maxwell NVIDIA GPU, on Pascal (exactly same software, only different couple of years newer computer) - black square already at 1st latent step (koboldcpp 1.120 allow preview of latent steps), whereas in "normal" diffusion run e.g. on Pascal already 1st step is fuzzy sketch (so after couple of waits to final image - which were grey squares on Pascal - I started to cancel after 1-2 SD steps). I have tried CUDA, Vulkan, "old PC" kcpp build (retrospectively same error on "old" makes sense, I have read "old" means CUDA 11.5, but Maxwell is AFAIK way older) with Vulkan and CUDA, two quants from different accounts on HF - same black square.
What do you think about this Maxwell vs Pascal difference? I have idea to build kcpp with NVIDIA compute capability limited to Maxwell level and try to run on Pascal. Is it easy to do? Cheers.
P.S. Does unquantized ZiB works without this issue? If so I will try to download, though it is rather large for my hardware.