wenxiang guo commited on
Commit
1ac622b
·
verified ·
1 Parent(s): 060e76c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -5,7 +5,6 @@ directory = pathlib.Path(os.getcwd())
5
  print(directory)
6
  sys.path.append(str(directory))
7
  import torch
8
- print(f"Is CUDA available: {torch.cuda.is_available()}")
9
  import numpy as np
10
  from omegaconf import OmegaConf
11
  from ldm.util import instantiate_from_config
@@ -36,8 +35,8 @@ def load_model_from_config(config, ckpt = None, verbose=True):
36
  print(u)
37
  else:
38
  print(f"Note chat no ckpt is loaded !!!")
39
-
40
- model.cuda()
41
  model.eval()
42
  return model
43
 
 
5
  print(directory)
6
  sys.path.append(str(directory))
7
  import torch
 
8
  import numpy as np
9
  from omegaconf import OmegaConf
10
  from ldm.util import instantiate_from_config
 
35
  print(u)
36
  else:
37
  print(f"Note chat no ckpt is loaded !!!")
38
+ if torch.cuda.is_available():
39
+ model.cuda()
40
  model.eval()
41
  return model
42