1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Remove comments no longer appropriate (#716)

Remove comments no longer appropriate.

There were casting operations before, they are now gone.
This commit is contained in:
Pedro Cuenca
2022-10-04 17:00:09 +02:00
committed by GitHub
parent 215bb40882
commit 6b221920d7
2 changed files with 0 additions and 6 deletions

View File

@@ -335,8 +335,6 @@ class ResnetBlock2D(nn.Module):
def forward(self, x, temb):
hidden_states = x
# make sure hidden states is in float32
# when running in half-precision
hidden_states = self.norm1(hidden_states)
hidden_states = self.nonlinearity(hidden_states)
@@ -353,8 +351,6 @@ class ResnetBlock2D(nn.Module):
temb = self.time_emb_proj(self.nonlinearity(temb))[:, :, None, None]
hidden_states = hidden_states + temb
# make sure hidden states is in float32
# when running in half-precision
hidden_states = self.norm2(hidden_states)
hidden_states = self.nonlinearity(hidden_states)

View File

@@ -313,8 +313,6 @@ class UNet2DConditionModel(ModelMixin, ConfigMixin):
hidden_states=sample, temb=emb, res_hidden_states_tuple=res_samples, upsample_size=upsample_size
)
# 6. post-process
# make sure hidden states is in float32
# when running in half-precision
sample = self.conv_norm_out(sample)
sample = self.conv_act(sample)
sample = self.conv_out(sample)