leejet
leejet
I've implemented Stable Diffusion using GGML. Welcome to try it out. https://github.com/leejet/stable-diffusion.cpp This is an example ``` ./sd -m ../models/sd-v1-4-ggml-model-f16.bin -p "a lovely cat" ``` 
I've implemented Stable Diffusion using GGML. Welcome to try it out. https://github.com/leejet/stable-diffusion.cpp This is an example ``` ./sd -m ../models/sd-v1-4-ggml-model-f16.bin -p "a lovely cat" ``` 
The ggml_group_norm is not calculated over the first 2 dimensions, but rather splits ne2 (which is equivalent to num_channels in PyTorch) into n_groups (equivalent to num_groups in PyTorch) groups and...
Here is a simple schematic diagram: ne0 => W, ne1 => H, ne2 => C, ne3 => N. 
I just updated the ggml of stable-diffusion.cpp to the latest commit. It works great, the image generation speed on the CPU has improved, and I haven't encountered any issues.
The issue arose due to my mistaken merge of https://github.com/leejet/stable-diffusion.cpp/pull/233. I believe it has been fixed in the latest commit.
@grauho In Release mode, assertions are disabled during compilation, which is likely why you couldn't reproduce the error. I believe most people compile in Release mode, so they wouldn't encounter...
> @leejet I believe that is done by adding noise only to the white part of the latent image, and in the decoder, keeping the pixels of the black part...
> @leejet I think we should first solve that problem before considering adding the inpainting feature. > > Inpainting models require a latent image with 9 input channels, 4 for...
This seems to be an issue with the implementation of the ggml Metal backend. You can try removing the corresponding assets to see if the issue persists.