Arulkumar03 commited on
Commit
03cec90
1 Parent(s): faf6b2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -29,7 +29,7 @@ import torch
29
  from io import BytesIO
30
  from diffusers import StableDiffusionInpaintPipeline
31
  from huggingface_hub import hf_hub_download
32
-
33
  def load_model_hf(repo_id, filename, ckpt_config_filename, device='cpu'):
34
  cache_config_file = hf_hub_download(repo_id=repo_id, filename=ckpt_config_filename)
35
 
 
29
  from io import BytesIO
30
  from diffusers import StableDiffusionInpaintPipeline
31
  from huggingface_hub import hf_hub_download
32
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
33
  def load_model_hf(repo_id, filename, ckpt_config_filename, device='cpu'):
34
  cache_config_file = hf_hub_download(repo_id=repo_id, filename=ckpt_config_filename)
35