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

Flux.1 and OSX with M1 #14

Open
odoremieux opened this issue Aug 16, 2024 · 5 comments
Open

Flux.1 and OSX with M1 #14

odoremieux opened this issue Aug 16, 2024 · 5 comments

Comments

@odoremieux
Copy link

I'm not able to make the Flux.1 work on OSX with M1, I'm getting

TypeError: Trying to convert Float8_e4m3fn to the MPS backend but it does not have support for that dtype.

Anybody has been successful?

@Teriks
Copy link
Contributor

Teriks commented Aug 20, 2024

try qint8 quantization instead of qfloat8

@odoremieux
Copy link
Author

I did try it, it doesn't generate that error again, but I get : Token indices sequence length is longer than the specified maximum sequence length for this model (80 > 77). Running this sequence through the model will result in indexing errors,
And the generated image is all pixelized

@Teriks
Copy link
Contributor

Teriks commented Aug 28, 2024

I did try it, it doesn't generate that error again, but I get : Token indices sequence length is longer than the specified maximum sequence length for this model (80 > 77). Running this sequence through the model will result in indexing errors, And the generated image is all pixelized

The message about token length is ignorable

#11 (comment)

As for the image result I am not sure, I really wish I had a Mac myself to test MPS for my own projects

You might find some users discussing getting Flux working on MPS in this issue: huggingface/diffusers#9047

There are some people experiencing pixelated images in this thread, might be related

@odoremieux
Copy link
Author

Here is the prompt I used : A dreamy, soft-focus photograph capturing a romantic Jane Austen movie scene,
in the style of Agnes Cecile. Delicate watercolors, misty background,
Regency-era couple, tender embrace, period clothing, flowing dress, dappled sunlight,
ethereal glow, gentle expressions, intricate lace, muted pastels, serene countryside,
timeless romance, poetic atmosphere, wistful mood, look at camera.

It's using "black-forest-labs/FLUX.1-schnell"

The image generated :
flux_image_a

Usually with that model, I don't have any issue, I'm just trying to go around the token limitation for the prompt

@Teriks
Copy link
Contributor

Teriks commented Aug 28, 2024

Possibly a precision oddity in the embed generation if it works normally using diffusers default embed generation. i.e, passing a prompt and/or prompt_2 string to pipe.__call__ instead of directly passing embeds generated by sd_embed

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