Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
Fix img2img.py for cpu code.
  • Loading branch information
ModeratePrawn authored Sep 1, 2022
commit d68cd0dcb17d9f962868ce665e9f68793493e910
3 changes: 2 additions & 1 deletion scripts/img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def load_model_from_config(config, ckpt, verbose=False):
print("unexpected keys:")
print(u)

model.cuda()
if torch.cuda.is_available():
model.cuda()
model.eval()
return model

Expand Down