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
added cpu support to img2img.py
  • Loading branch information
SpandexWizard authored Sep 1, 2022
commit d3f1ebcbd71ec5521142c55f617e92303ffd872d
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