patrickvonplaten commited on
Commit
8110171
1 Parent(s): 76f6257

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -35,7 +35,7 @@ def inference(
35
  dtype = torch.float16 if torch_device == "cuda" else torch.float32
36
 
37
  try:
38
- revision = f"refs/pr/{discuss_nr}"
39
  pipe = DiffusionPipeline.from_pretrained(repo_id, revision=revision, torch_dtype=dtype)
40
  pipe.to(torch_device)
41
 
 
35
  dtype = torch.float16 if torch_device == "cuda" else torch.float32
36
 
37
  try:
38
+ revision = f"refs/pr/{discuss_nr}" if (discuss_nr != "" or discuss_nr is None) else None
39
  pipe = DiffusionPipeline.from_pretrained(repo_id, revision=revision, torch_dtype=dtype)
40
  pipe.to(torch_device)
41