Paper99 commited on
Commit
12f63d9
1 Parent(s): 0e6b5f9

Update PhotoMaker v2 demo

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -42,7 +42,11 @@ DEFAULT_ASPECT_RATIO = ASPECT_RATIO_LABELS[0]
42
  enable_doodle_arg = False
43
  photomaker_ckpt = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v2.bin", repo_type="model")
44
 
45
- torch_dtype = torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16
 
 
 
 
46
  if device == "mps":
47
  torch_dtype = torch.float16
48
 
 
42
  enable_doodle_arg = False
43
  photomaker_ckpt = hf_hub_download(repo_id="TencentARC/PhotoMaker", filename="photomaker-v2.bin", repo_type="model")
44
 
45
+ if torch.cuda.is_available() and torch.cuda.is_bf16_supported():
46
+ torch_dtype = torch.bfloat16
47
+ else:
48
+ torch_dtype = torch.float16
49
+
50
  if device == "mps":
51
  torch_dtype = torch.float16
52