Skip to content

Commit

Permalink
fix for the previous fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Dec 30, 2023
1 parent 8100e90 commit 3be9074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/upscaler_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def upscale_without_tiling(model, img: Image.Image):
img = np.ascontiguousarray(np.transpose(img, (2, 0, 1))) / 255
img = torch.from_numpy(img).float()

model_weight = next(iter(model.parameters()))
model_weight = next(iter(model.model.parameters()))
img = img.unsqueeze(0).to(device=model_weight.device, dtype=model_weight.dtype)

with torch.no_grad():
Expand Down

0 comments on commit 3be9074

Please sign in to comment.