leejet / stable-diffusion.cpp

Stable Diffusion and Flux in pure C/C++
MIT License
3.4k stars 289 forks source link

Segmentation fault for 3.5-large-turbo #449

Open DanaNikifor opened 3 hours ago

DanaNikifor commented 3 hours ago

Danilka-Netbook:/mnt/e/stable-diffusion.cpp/build/bin$ ./sd -m /mnt/e/Models/sd3.5_large_turbo-Q4_0.gguf --cfg-scale 1 - -steps 1 -p "masterpiece, best quality, 1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green backg round, hat, hoop earrings, jewellery, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt" -n "low quality, logo on cap" -v Option: n_threads: 4 mode: txt2img model_path: /mnt/e/Models/sd3.5_large_turbo-Q4_0.gguf wtype: unspecified clip_l_path: clip_g_path: t5xxl_path: diffusion_model_path: vae_path: taesd_path: esrgan_path: controlnet_path: embeddings_path: stacked_id_embeddings_path: input_id_images_path: style ratio: 20.00 normalize input image : false output_path: output.png init_img: control_image: clip on cpu: false controlnet cpu: false vae decoder on cpu:false strength(control): 0.90 prompt: masterpiece, best quality, 1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewellery, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt negative_prompt: low quality, logo on cap min_cfg: 1.00 cfg_scale: 1.00 guidance: 3.50 clip_skip: -1 width: 512 height: 512 sample_method: euler_a schedule: default sample_steps: 1 strength(img2img): 0.75 rng: cuda seed: 42 batch_count: 1 vae_tiling: false upscale_repeats: 1 System Info: BLAS = 0 SSE3 = 1 AVX = 0 AVX2 = 0 AVX512 = 0 AVX512_VBMI = 0 AVX512_VNNI = 0 FMA = 0 NEON = 0 ARM_FMA = 0 F16C = 0 FP16_VA = 0 WASM_SIMD = 0 VSX = 0 [DEBUG] stable-diffusion.cpp:182 - Using CPU backend [INFO ] stable-diffusion.cpp:197 - loading model from '/mnt/e/Models/sd3.5_large_turbo-Q4_0.gguf' [INFO ] model.cpp:801 - load /mnt/e/Models/sd3.5_large_turbo-Q4_0.gguf using gguf format [DEBUG] model.cpp:818 - init from '/mnt/e/Models/sd3.5_large_turbo-Q4_0.gguf' [INFO ] stable-diffusion.cpp:244 - Version: SD3.5 8B [INFO ] stable-diffusion.cpp:275 - Weight type: q4_0 Segmentation fault

Help fix it, pls

stduhpf commented 2 hours ago

This look oddly similar to this https://github.com/leejet/stable-diffusion.cpp/issues/442#issuecomment-2436041720. If you're using city96's quants, I think they are incompatible with sdcpp for some obscure reason. Try quantizing yourself, or use these instead: https://huggingface.co/stduhpf/SD3.5-Large-Turbo-GGUF-mixed-sdcpp

DanaNikifor commented 2 hours ago

OK, I'll try to do it soon

DanaNikifor commented 1 hour ago

No. I couldn't run your model. I also tried to run the model from ND911 https://huggingface.co/ND911/stable-diffusion-3.5-large-Turbo-GGUF/blob/main/sd3.5_large_turbo-Q4_0.gguf and also did not start

stduhpf commented 32 minutes ago

That's odd, I couldn't run City96's quant either, but I tested all of mines at least 3 times each.... Does the full model work?

SkutteOleg commented 24 minutes ago

You have to specify t5xxl, clip_l and clip_g