Spaces:
Sleeping
Sleeping
rezaarmand
commited on
Commit
•
46c6c58
1
Parent(s):
7da3063
cpu fix
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ def predict(prompt, weights, seed, scale=7.5, steps=50):
|
|
95 |
generator = torch.Generator().manual_seed(int(seed))
|
96 |
image_perpneg = pipe(prompt, guidance_scale=float(scale), generator=generator,
|
97 |
num_inference_steps=steps, weights=weights)["images"][0]
|
98 |
-
|
99 |
except Exception as e:
|
100 |
print(e)
|
101 |
return None
|
|
|
95 |
generator = torch.Generator().manual_seed(int(seed))
|
96 |
image_perpneg = pipe(prompt, guidance_scale=float(scale), generator=generator,
|
97 |
num_inference_steps=steps, weights=weights)["images"][0]
|
98 |
+
return image_perpneg
|
99 |
except Exception as e:
|
100 |
print(e)
|
101 |
return None
|