Skip to content

Commit ce816b9

Browse files
committed
delete unnecessary code and replace
1 parent 59dde18 commit ce816b9

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • labml_nn/diffusion/stable_diffusion/model

labml_nn/diffusion/stable_diffusion/model/unet.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import numpy as np
2222
import torch
23-
import torch as th
2423
import torch.nn as nn
2524
import torch.nn.functional as F
2625

@@ -174,7 +173,7 @@ def forward(self, x: torch.Tensor, time_steps: torch.Tensor, cond: torch.Tensor)
174173
x = self.middle_block(x, t_emb, cond)
175174
# Output half of the U-Net
176175
for module in self.output_blocks:
177-
x = th.cat([x, x_input_block.pop()], dim=1)
176+
x = torch.cat([x, x_input_block.pop()], dim=1)
178177
x = module(x, t_emb, cond)
179178

180179
# Final normalization and $3 \times 3$ convolution

0 commit comments

Comments
 (0)