Spaces:
Running
on
Zero
Running
on
Zero
Doron Adler
commited on
Commit
•
837968e
1
Parent(s):
c359cbc
Seed 0 will again mean rundom on CPU
Browse files
app.py
CHANGED
@@ -42,8 +42,7 @@ def inference(prompt, guidance, steps, width=512, height=512, seed=0, img=None,
|
|
42 |
if torch.cuda.is_available():
|
43 |
generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
|
44 |
else:
|
45 |
-
if seed != 0:
|
46 |
-
torch.manual_seed(seed)
|
47 |
generator = torch.Generator()
|
48 |
generator.manual_seed(seed)
|
49 |
else:
|
|
|
42 |
if torch.cuda.is_available():
|
43 |
generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
|
44 |
else:
|
45 |
+
if seed != 0:
|
|
|
46 |
generator = torch.Generator()
|
47 |
generator.manual_seed(seed)
|
48 |
else:
|