Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,7 @@ upscaler.enable_xformers_memory_efficient_attention()
|
|
| 18 |
|
| 19 |
def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale):
|
| 20 |
|
| 21 |
-
generator =
|
| 22 |
|
| 23 |
if upscale == "Yes":
|
| 24 |
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
|
|
|
|
| 18 |
|
| 19 |
def genie (Prompt, negative_prompt, height, width, scale, steps, seed, upscale):
|
| 20 |
|
| 21 |
+
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
| 22 |
|
| 23 |
if upscale == "Yes":
|
| 24 |
image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale).images[0]
|