Skip to content

Conversation

@mwkldeveloper
Copy link
Contributor

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

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
Copy link
Member

sayakpaul commented Dec 21, 2023

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
Copy link
Contributor Author

ok got it

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