-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Once I draw a 1024*1024 image, the program crashes #49
Comments
What exactly do you mean with crashing? Is there any error message? does the same model with the same settings work in the stable-diffusion.cpp example application? |
When I input 1024*1024, it just disappeared without any warning or error.I don't know how to use C++,I am a novice in coding,sry |
I have the exact same issue, very simple steps:
The program '[30440] ImageCreationUI.exe' has exited with code 3221226505 (0xc0000409). STABLE DIFFUSION [Debug]: stable-diffusion.cpp:163 - Using CUDA backend STABLE DIFFUSION [Debug]: stable-diffusion.cpp:163 - Using CUDA backend STABLE DIFFUSION [Info]: stable-diffusion.cpp:195 - loading model from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' STABLE DIFFUSION [Info]: stable-diffusion.cpp:195 - loading model from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' STABLE DIFFUSION [Info]: stable-diffusion.cpp:195 - loading model from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' STABLE DIFFUSION [Info]: model.cpp:885 - load I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf using gguf format STABLE DIFFUSION [Info]: model.cpp:885 - load I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf using gguf format STABLE DIFFUSION [Info]: model.cpp:885 - load I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf using gguf format STABLE DIFFUSION [Debug]: model.cpp:902 - init from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' STABLE DIFFUSION [Debug]: model.cpp:902 - init from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' STABLE DIFFUSION [Debug]: model.cpp:902 - init from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' STABLE DIFFUSION [Info]: stable-diffusion.cpp:242 - Version: SD 1.x STABLE DIFFUSION [Info]: stable-diffusion.cpp:242 - Version: SD 1.x STABLE DIFFUSION [Info]: stable-diffusion.cpp:242 - Version: SD 1.x STABLE DIFFUSION [Info]: stable-diffusion.cpp:275 - Weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:275 - Weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:275 - Weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:276 - Conditioner weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:276 - Conditioner weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:276 - Conditioner weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:277 - Diffusion model weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:277 - Diffusion model weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:277 - Diffusion model weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:278 - VAE weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:278 - VAE weight type: q4_0 STABLE DIFFUSION [Info]: stable-diffusion.cpp:278 - VAE weight type: q4_0 STABLE DIFFUSION [Debug]: stable-diffusion.cpp:280 - ggml tensor size = 400 bytes STABLE DIFFUSION [Debug]: stable-diffusion.cpp:280 - ggml tensor size = 400 bytes STABLE DIFFUSION [Debug]: stable-diffusion.cpp:280 - ggml tensor size = 400 bytes STABLE DIFFUSION [Debug]: clip.hpp:171 - vocab size: 49408 STABLE DIFFUSION [Debug]: clip.hpp:171 - vocab size: 49408 STABLE DIFFUSION [Debug]: clip.hpp:171 - vocab size: 49408 STABLE DIFFUSION [Debug]: clip.hpp:182 - trigger word img already in vocab STABLE DIFFUSION [Debug]: clip.hpp:182 - trigger word img already in vocab STABLE DIFFUSION [Debug]: clip.hpp:182 - trigger word img already in vocab STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - clip params backend buffer size = 66.62 MB(VRAM) (196 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - clip params backend buffer size = 66.62 MB(VRAM) (196 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - clip params backend buffer size = 66.62 MB(VRAM) (196 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - unet params backend buffer size = 1270.08 MB(VRAM) (686 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - unet params backend buffer size = 1270.08 MB(VRAM) (686 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - unet params backend buffer size = 1270.08 MB(VRAM) (686 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - vae params backend buffer size = 159.68 MB(VRAM) (248 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - vae params backend buffer size = 159.68 MB(VRAM) (248 tensors) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1111 - vae params backend buffer size = 159.68 MB(VRAM) (248 tensors) STABLE DIFFUSION [Debug]: stable-diffusion.cpp:417 - loading weights STABLE DIFFUSION [Debug]: stable-diffusion.cpp:417 - loading weights STABLE DIFFUSION [Debug]: stable-diffusion.cpp:417 - loading weights STABLE DIFFUSION [Debug]: model.cpp:1698 - loading tensors from I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf STABLE DIFFUSION [Debug]: model.cpp:1698 - loading tensors from I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf STABLE DIFFUSION [Debug]: model.cpp:1698 - loading tensors from I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf STABLE DIFFUSION [Info]: stable-diffusion.cpp:516 - total params memory size = 1496.38MB (VRAM 1496.38MB, RAM 0.00MB): clip 66.62MB(VRAM), unet 1270.08MB(VRAM), vae 159.68MB(VRAM), controlnet 0.00MB(VRAM), pmid 0.00MB(VRAM) STABLE DIFFUSION [Info]: stable-diffusion.cpp:516 - total params memory size = 1496.38MB (VRAM 1496.38MB, RAM 0.00MB): clip 66.62MB(VRAM), unet 1270.08MB(VRAM), vae 159.68MB(VRAM), controlnet 0.00MB(VRAM), pmid 0.00MB(VRAM) STABLE DIFFUSION [Info]: stable-diffusion.cpp:516 - total params memory size = 1496.38MB (VRAM 1496.38MB, RAM 0.00MB): clip 66.62MB(VRAM), unet 1270.08MB(VRAM), vae 159.68MB(VRAM), controlnet 0.00MB(VRAM), pmid 0.00MB(VRAM) STABLE DIFFUSION [Info]: stable-diffusion.cpp:520 - loading model from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' completed, taking 1.58s STABLE DIFFUSION [Info]: stable-diffusion.cpp:520 - loading model from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' completed, taking 1.58s STABLE DIFFUSION [Info]: stable-diffusion.cpp:520 - loading model from 'I:\LvsSdModels\stable-diffusion-v1-5-pruned-emaonly-Q4_0.gguf' completed, taking 1.58s STABLE DIFFUSION [Info]: stable-diffusion.cpp:550 - running in eps-prediction mode STABLE DIFFUSION [Info]: stable-diffusion.cpp:550 - running in eps-prediction mode STABLE DIFFUSION [Info]: stable-diffusion.cpp:550 - running in eps-prediction mode STABLE DIFFUSION [Debug]: stable-diffusion.cpp:594 - finished loaded file STABLE DIFFUSION [Debug]: stable-diffusion.cpp:594 - finished loaded file STABLE DIFFUSION [Debug]: stable-diffusion.cpp:594 - finished loaded file STABLE DIFFUSION [Debug]: stable-diffusion.cpp:1535 - txt2img 1024x1024 STABLE DIFFUSION [Debug]: stable-diffusion.cpp:1535 - txt2img 1024x1024 STABLE DIFFUSION [Debug]: stable-diffusion.cpp:1535 - txt2img 1024x1024 STABLE DIFFUSION [Debug]: stable-diffusion.cpp:1230 - prompt after extract and remove lora: "Anime girl jumping" STABLE DIFFUSION [Debug]: stable-diffusion.cpp:1230 - prompt after extract and remove lora: "Anime girl jumping" STABLE DIFFUSION [Debug]: stable-diffusion.cpp:1230 - prompt after extract and remove lora: "Anime girl jumping" STABLE DIFFUSION [Info]: stable-diffusion.cpp:682 - Attempting to apply 0 LoRAs STABLE DIFFUSION [Info]: stable-diffusion.cpp:682 - Attempting to apply 0 LoRAs STABLE DIFFUSION [Info]: stable-diffusion.cpp:682 - Attempting to apply 0 LoRAs STABLE DIFFUSION [Info]: stable-diffusion.cpp:1235 - apply_loras completed, taking 0.00s STABLE DIFFUSION [Info]: stable-diffusion.cpp:1235 - apply_loras completed, taking 0.00s STABLE DIFFUSION [Info]: stable-diffusion.cpp:1235 - apply_loras completed, taking 0.00s STABLE DIFFUSION [Debug]: conditioner.hpp:329 - parse 'Anime girl jumping' to [['Anime girl jumping', 1], ] STABLE DIFFUSION [Debug]: conditioner.hpp:329 - parse 'Anime girl jumping' to [['Anime girl jumping', 1], ] STABLE DIFFUSION [Debug]: conditioner.hpp:329 - parse 'Anime girl jumping' to [['Anime girl jumping', 1], ] STABLE DIFFUSION [Debug]: clip.hpp:311 - token length: 77 STABLE DIFFUSION [Debug]: clip.hpp:311 - token length: 77 STABLE DIFFUSION [Debug]: clip.hpp:311 - token length: 77 STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - clip compute buffer size: 1.40 MB(VRAM) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - clip compute buffer size: 1.40 MB(VRAM) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - clip compute buffer size: 1.40 MB(VRAM) STABLE DIFFUSION [Debug]: conditioner.hpp:457 - computing condition graph completed, taking 96 ms STABLE DIFFUSION [Debug]: conditioner.hpp:457 - computing condition graph completed, taking 96 ms STABLE DIFFUSION [Debug]: conditioner.hpp:457 - computing condition graph completed, taking 96 ms STABLE DIFFUSION [Debug]: conditioner.hpp:329 - parse '' to [['', 1], ] STABLE DIFFUSION [Debug]: conditioner.hpp:329 - parse '' to [['', 1], ] STABLE DIFFUSION [Debug]: conditioner.hpp:329 - parse '' to [['', 1], ] STABLE DIFFUSION [Debug]: clip.hpp:311 - token length: 77 STABLE DIFFUSION [Debug]: clip.hpp:311 - token length: 77 STABLE DIFFUSION [Debug]: clip.hpp:311 - token length: 77 STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - clip compute buffer size: 1.40 MB(VRAM) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - clip compute buffer size: 1.40 MB(VRAM) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - clip compute buffer size: 1.40 MB(VRAM) STABLE DIFFUSION [Debug]: conditioner.hpp:457 - computing condition graph completed, taking 12 ms STABLE DIFFUSION [Debug]: conditioner.hpp:457 - computing condition graph completed, taking 12 ms STABLE DIFFUSION [Debug]: conditioner.hpp:457 - computing condition graph completed, taking 12 ms STABLE DIFFUSION [Info]: stable-diffusion.cpp:1368 - get_learned_condition completed, taking 162 ms STABLE DIFFUSION [Info]: stable-diffusion.cpp:1368 - get_learned_condition completed, taking 162 ms STABLE DIFFUSION [Info]: stable-diffusion.cpp:1368 - get_learned_condition completed, taking 162 ms STABLE DIFFUSION [Info]: stable-diffusion.cpp:1391 - sampling using Euler A method STABLE DIFFUSION [Info]: stable-diffusion.cpp:1391 - sampling using Euler A method STABLE DIFFUSION [Info]: stable-diffusion.cpp:1391 - sampling using Euler A method STABLE DIFFUSION [Info]: stable-diffusion.cpp:1428 - generating image: 1/1 - seed 10990 STABLE DIFFUSION [Info]: stable-diffusion.cpp:1428 - generating image: 1/1 - seed 10990 STABLE DIFFUSION [Info]: stable-diffusion.cpp:1428 - generating image: 1/1 - seed 10990 STABLE DIFFUSION [Debug]: stable-diffusion.cpp:798 - Sample STABLE DIFFUSION [Debug]: stable-diffusion.cpp:798 - Sample STABLE DIFFUSION [Debug]: stable-diffusion.cpp:798 - Sample STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - unet compute buffer size: 8360.93 MB(VRAM) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - unet compute buffer size: 8360.93 MB(VRAM) STABLE DIFFUSION [Debug]: ggml_extend.hpp:1062 - unet compute buffer size: 8360.93 MB(VRAM) Edit: I got bit better error message when I used the pverload with parameters (_diffusionModel!.TextToImage(prompt, newTp.Parameters)): 338|2025-02-06T19:02:47.5174260+00:00|ERROR|25|MainPage|AppDomain.CurrentDomain.FirstChanceException, stack: at StableDiffusion.NET.Native.g____PInvoke|10_0(sd_ctx_t* __sd_ctx_native, Byte* __prompt_native, Byte* __negative_prompt_native, Int32 __clip_skip_native, Single __cfg_scale_native, Single __guidance_native, Int32 __width_native, Int32 __height_native, Sampler __sample_method_native, Int32 __sample_steps_native, Int64 __seed_native, Int32 __batch_count_native, sd_image_t* __control_cond_native, Single __control_strength_native, Single __style_strength_native, SByte __normalize_input_native, Byte* __input_id_images_path_native, Int32* __skip_layers_native, Int32 __skip_layers_count_native, Single __slg_scale_native, Single __skip_layer_start_native, Single __skip_layer_end_native) Edit x2: 1920x1024 does not crash, but it hogged all my memory from GPU (I have done 1920x1080 images before with Comfy without issues, with Flux 1 schell, but probably that's another topic) |
Looking at that stack trace I'm pretty sure that's an issue in stable-diffusion.cpp in which case I can't help. Please try the same model with the reference application over there (https://github.com/leejet/stable-diffusion.cpp/releases). |
Actually right after commenting here, the integration started to crash on all resolutions, app restart did not work. I tried one other c# "wrapper" for the cpp code and that did not crash. I'll try with the latest cpp release later this today. How up-to-date this is with cpp version? I noticed the cpp version does not need everything to be converted to .gguf, so I'm thinking should I just use cpp dll's directly? |
OK, looks like there's issue with the latest .cpp: |
This is the last stable diffusion cpp release that works for me: https://github.com/leejet/stable-diffusion.cpp/releases/tag/master-b5f4932 After that, the cuda-dll-release size dropped dramatically and probably does not have all necessary files... (I tried with sd3.5) |
The limit is 1024 * 768
![image](https://private-user-images.githubusercontent.com/100769574/401877231-17c5a7bc-c3ef-48ca-a6d6-97d7e4fda12b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTg2MzcsIm5iZiI6MTczOTE5ODMzNywicGF0aCI6Ii8xMDA3Njk1NzQvNDAxODc3MjMxLTE3YzVhN2JjLWMzZWYtNDhjYS1hNmQ2LTk3ZDdlNGZkYTEyYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMFQxNDM4NTdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05YzBkYmQzYmZkZTI1Zjk0MmY1OGYwYjIxZjllZWM3MDY4ZGIzMTVkMjJkYWE4NDZhMWI3MDhjZTdiMDNhYjU5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.dXYmhdjzVzOo_WmhXqMy6jb2eN2uJYP_m9qH4q1xpwM)
My device is i9-13900KF, 4090
Is there any way to solve it?
The text was updated successfully, but these errors were encountered: