Skip to content

Commit

Permalink
Remove comments no longer appropriate (open-mmlab#716)
Browse files Browse the repository at this point in the history
Remove comments no longer appropriate.

There were casting operations before, they are now gone.
  • Loading branch information
pcuenca authored Oct 4, 2022
1 parent 215bb40 commit 6b22192
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/diffusers/models/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ def __init__(
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)

Expand All @@ -353,8 +351,6 @@ def forward(self, x, temb):
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)

Expand Down
2 changes: 0 additions & 2 deletions src/diffusers/models/unet_2d_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@ def forward(
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)
Expand Down

0 comments on commit 6b22192

Please sign in to comment.