Unverified Commit 6b221920 authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Remove comments no longer appropriate (#716)

Remove comments no longer appropriate.

There were casting operations before, they are now gone.
parent 215bb408
......@@ -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)
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment