Skip to content
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

Support for shuttle-3-diffusion #469

Open
bombless opened this issue Nov 19, 2024 · 8 comments
Open

Support for shuttle-3-diffusion #469

bombless opened this issue Nov 19, 2024 · 8 comments

Comments

@bombless
Copy link

I downloaded the weights from https://huggingface.co/shuttleai/shuttle-3-diffusion, the program loaded the weights and exit for no error message.

I debugged the program, it seems that the problem is the call to ggml_type_name() with parameter 34, which is missing in the ggml.h file. Checking the llama.cpp repo, it should be GGML_TYPE_TQ1_0, added from ggerganov/llama.cpp#8151

@stduhpf
Copy link
Contributor

stduhpf commented Nov 19, 2024

In the version of ggml used by sdcpp, type 34 is invalid: https://github.com/ggerganov/ggml/blob/21d3a308fcb7f31cb9beceaeebad4fb622f3c337/include/ggml.h#L396

Shuttle-3-diffusion should work just like Flux Schnell in theory.

Can you share the command you used to launch it?

@bombless
Copy link
Author

bombless commented Nov 19, 2024

Thank you for your reply!
The command is bin/Debug/sd.exe -m e:/Downloads/shuttle-3-diffusion.safetensors -p "red cat" -v

@bombless
Copy link
Author

FYI the real problem is in https://github.com/ggerganov/ggml/blob/21d3a308fcb7f31cb9beceaeebad4fb622f3c337/src/ggml.c#L1015, the entry for 34 is missing.

@stduhpf
Copy link
Contributor

stduhpf commented Nov 19, 2024

Thank you for your reply! The command is bin/Debug/sd.exe -m e:/Downloads/shuttle-3-diffusion.safetensors -p "red cat" -v

I don't think shuttle-3-diffusion has built-in vae and text encoders. You should download t5xxl, clip_L (from here ) and the vae from the shuttle-3-diffusion repo, then use bin/Debug/sd.exe -m e:/Downloads/shuttle-3-diffusion.safetensors --vae path/to/diffusion_pytorch_model.safetensors --t5xxl path/to/t5xxl_fp16.safetensors --clip_l path/to/clip_l.safetensors -p "red cat" -v instead

Also, GGML_TYPE_TQ1_0 is missing in your link.

FYI the real problem is in https://github.com/ggerganov/ggml/blob/21d3a308fcb7f31cb9beceaeebad4fb622f3c337/src/ggml.c#L1015, the entry for 34 is missing.

I don't think it's related. Sdcpp uses an older version of GGML that doesn't support TQ1_0 type yet. This shouldn't cause any issues.

@bombless
Copy link
Author

Thank you for the pointers.

I tried bin/Debug/sd.exe -m e:/Downloads/shuttle-3-diffusion.safetensors --vae path/to/diffusion_pytorch_model.safetensors --t5xxl path/to/t5xxl_fp16.safetensors --clip_l path/to/clip_l.safetensors -p "red cat" -v and nothing changed, no error message, output.png isn't there.

I believe sdcpp should at least imply that the process didn't finish.

@stduhpf
Copy link
Contributor

stduhpf commented Nov 19, 2024

That's weird

@bombless
Copy link
Author

Okay it worked!
I was missing a parameter.
Any idea why it didn't emit an error when some tensors are missing?

@stduhpf
Copy link
Contributor

stduhpf commented Nov 19, 2024

Any idea why it didn't emit an error when some tensors are missing?

I don't have a definitive answer, but it probably have something to do with the call to ggml_type_name(34) you noticed. i think ggml_type_name() Is only ever used in some error logs, so what could have happend is it crashed when trying to print the error because the invaild type isn't properly handled.

Glad you got it working though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants