stale2000 commited on
Commit
150be19
1 Parent(s): 85685f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -21,7 +21,8 @@ authtoken = os.getenv('authtoken')
21
 
22
  device = "cuda" if torch.cuda.is_available() else "cpu"
23
  context = autocast if device == "cuda" else nullcontext
24
- pipe = StableDiffusionPipeline.from_pretrained("stale2000/sd-dnditem", torch_dtype=torch.float16, use_auth_token=authtoken)
 
25
  pipe = pipe.to(device)
26
 
27
  def predict(input, manual_query_repacement, history=[]):
 
21
 
22
  device = "cuda" if torch.cuda.is_available() else "cpu"
23
  context = autocast if device == "cuda" else nullcontext
24
+ dtype = torch.float16 if device == "cuda" else torch.float32
25
+ pipe = StableDiffusionPipeline.from_pretrained("stale2000/sd-dnditem", torch_dtype=dtype, use_auth_token=authtoken)
26
  pipe = pipe.to(device)
27
 
28
  def predict(input, manual_query_repacement, history=[]):