diffusers
fix RuntimeError: Input type (float) and bias type (c10::Half) should be the same
#6241
Closed

fix RuntimeError: Input type (float) and bias type (c10::Half) should be the same #6241

mwkldeveloper wants to merge 0 commits into huggingface:main from mwkldeveloper:main
mwkldeveloper
mwkldeveloper1 year ago

What does this PR do?

fix RuntimeError: Input type (float) and bias type (c10::Half) should be the same
According to : #6208

Fixes #
By adding autocast block to

image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False, generator=generator)[

HuggingFaceDocBuilderDev
HuggingFaceDocBuilderDev1 year ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

sayakpaul
sayakpaul1 year ago (edited 1 year ago)

We don't include autocast blocks within the pipeline. It's the responsibility of the caller to have the pipeline called under the autocast context. Here's an example:

with torch.cuda.amp.autocast():

mwkldeveloper mwkldeveloper closed this 1 year ago
mwkldeveloper mwkldeveloper force pushed from cef7d3a3 to 6ca9c4af 1 year ago
mwkldeveloper
mwkldeveloper1 year ago

ok got it

Login to write a write a comment.

Login via GitHub

Reviewers
No reviews
Assignees
No one assigned
Labels
Milestone