Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,8 +21,8 @@ torch.cuda.empty_cache()
|
|
21 |
|
22 |
|
23 |
def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
|
24 |
-
|
25 |
-
generator=np.random.seed(0)
|
26 |
int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type="latent").images
|
27 |
image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=.99).images[0]
|
28 |
torch.cuda.empty_cache()
|
|
|
21 |
|
22 |
|
23 |
def genie (Prompt, negative_prompt, height, width, scale, steps, seed):
|
24 |
+
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
25 |
+
#generator=np.random.seed(0)
|
26 |
int_image = pipe(Prompt, negative_prompt=negative_prompt, height=height, width=width, num_inference_steps=steps, guidance_scale=scale, output_type="latent").images
|
27 |
image = refiner(Prompt, negative_prompt=negative_prompt, image=int_image, denoising_start=.99).images[0]
|
28 |
torch.cuda.empty_cache()
|