Skip to content

Conversation

@burgalon
Copy link
Contributor

No description provided.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Mar 18, 2023

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

# convert pipe to half
pipe.unet = pipe.unet.half()
pipe.vae = pipe.vae.half()
pipe.text_encoder = pipe.text_encoder.half()
Copy link
Contributor

Choose a reason for hiding this comment

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

This should probably be done before saving the pipeline no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my bad, thank you!

@patrickvonplaten
Copy link
Contributor

I think we can directly use the .to(...) method here - see docs: https://huggingface.co/docs/diffusers/main/en/api/diffusion_pipeline#diffusers.DiffusionPipeline.to it allows for dtype input now.

BTW @yiyixuxu we should probably add some nice docstring there

@burgalon
Copy link
Contributor Author

I think we can directly use the .to(...) method here

done

@patrickvonplaten
Copy link
Contributor

patrickvonplaten commented Mar 30, 2023

Nice job, lgtm!

@patrickvonplaten patrickvonplaten merged commit 9062b28 into huggingface:main Mar 30, 2023
w4ffl35 pushed a commit to w4ffl35/diffusers that referenced this pull request Apr 14, 2023
add --half to convert_original_stable_diffusion_to_diffusers.py
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
add --half to convert_original_stable_diffusion_to_diffusers.py
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.

3 participants