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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user