Skip to content

Commit 6b22192

Browse files
authored
Remove comments no longer appropriate (huggingface#716)
Remove comments no longer appropriate. There were casting operations before, they are now gone.
1 parent 215bb40 commit 6b22192

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

src/diffusers/models/resnet.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,6 @@ def __init__(
335335
def forward(self, x, temb):
336336
hidden_states = x
337337

338-
# make sure hidden states is in float32
339-
# when running in half-precision
340338
hidden_states = self.norm1(hidden_states)
341339
hidden_states = self.nonlinearity(hidden_states)
342340

@@ -353,8 +351,6 @@ def forward(self, x, temb):
353351
temb = self.time_emb_proj(self.nonlinearity(temb))[:, :, None, None]
354352
hidden_states = hidden_states + temb
355353

356-
# make sure hidden states is in float32
357-
# when running in half-precision
358354
hidden_states = self.norm2(hidden_states)
359355
hidden_states = self.nonlinearity(hidden_states)
360356

src/diffusers/models/unet_2d_condition.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ def forward(
313313
hidden_states=sample, temb=emb, res_hidden_states_tuple=res_samples, upsample_size=upsample_size
314314
)
315315
# 6. post-process
316-
# make sure hidden states is in float32
317-
# when running in half-precision
318316
sample = self.conv_norm_out(sample)
319317
sample = self.conv_act(sample)
320318
sample = self.conv_out(sample)

0 commit comments

Comments
 (0)