Skip to content

Conversation

@keturn
Copy link
Contributor

@keturn keturn commented Oct 5, 2022

Otherwise, it crashes when eta > 0 with float16.

Follow-up to #511.

Otherwise, it crashes when eta > 0 with float16.
@keturn
Copy link
Contributor Author

keturn commented Oct 5, 2022

Should we add a randn_like function somewhere that accepts generator? (because it doesn't exist yet upstream: pytorch/pytorch#27072 )

right now the different calls to randn are subtly inconsistent in whether and how they pass dtype or device. Having a single implementation would provide one place for those fiddly details, especially if there are things that have to be different on certain platforms like mps.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 5, 2022

The documentation is not available anymore as the PR was closed or merged.

@keturn
Copy link
Contributor Author

keturn commented Oct 5, 2022

All done! ✨ 🍰 ✨
123 files would be left unchanged.
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.14/x64/bin/doc-builder", line 8, in
sys.exit(main())
File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/doc_builder/commands/doc_builder_cli.py", line 47, in main
args.func(args)
File "/opt/hostedtoolcache/Python/3.7.14/x64/lib/python3.7/site-packages/doc_builder/commands/style.py", line 28, in style_command
raise ValueError(f"{len(changed)} files should be restyled!")
ValueError: 1 files should be restyled!

a) this is not an informative failure message.
b) I ran make style and it only changed some file that was not in this PR.

sod off, stylebot.

Copy link
Member

@pcuenca pcuenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@pcuenca
Copy link
Member

pcuenca commented Oct 6, 2022

Should we add a randn_like function somewhere that accepts generator? (because it doesn't exist yet upstream: pytorch/pytorch#27072 )

I think that makes sense, and we should ensure that all calls use the generator. If @patrickvonplaten and @anton-l agree we can follow up in a new PR :)

@kashif
Copy link
Contributor

kashif commented Oct 6, 2022

I think this fix can potentially be applied to sde-ve and sde-vp schedules too

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix! Thanks!

@patrickvonplaten patrickvonplaten merged commit cb0bf0b into huggingface:main Oct 7, 2022
prathikr pushed a commit to prathikr/diffusers that referenced this pull request Oct 26, 2022
Otherwise, it crashes when eta > 0 with float16.
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
Otherwise, it crashes when eta > 0 with float16.
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

Successfully merging this pull request may close these issues.

5 participants