Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def genie (prompt, negative_prompt, height, width, scale, steps, seed, upscaling
|
|
39 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
40 |
int_image = pipe(prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, num_inference_steps=steps, height=height, width=width, guidance_scale=scale, num_images_per_prompt=1, generator=generator, output_type="latent").images
|
41 |
if upscaling == 'Yes':
|
42 |
-
image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image,
|
43 |
upscaled = upscaler(prompt=prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0).images[0]
|
44 |
torch.cuda.empty_cache()
|
45 |
return (image, upscaled)
|
@@ -58,7 +58,7 @@ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generat
|
|
58 |
gr.Radio(['Yes', 'No'], value='No', label='Upscale?'),
|
59 |
gr.Textbox(label='Embedded Prompt'),
|
60 |
gr.Textbox(label='Embedded Negative Prompt'),
|
61 |
-
gr.Slider(minimum=.7, maximum=.99, value=.95, step=.01, label='Refiner Denoise %')],
|
62 |
outputs=['image', 'image'],
|
63 |
title="Stable Diffusion XL 1.0 GPU",
|
64 |
description="SDXL 1.0 GPU. <br><br><b>WARNING: Capable of producing NSFW (Softcore) images.</b>",
|
|
|
39 |
generator = np.random.seed(0) if seed == 0 else torch.manual_seed(seed)
|
40 |
int_image = pipe(prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, num_inference_steps=steps, height=height, width=width, guidance_scale=scale, num_images_per_prompt=1, generator=generator, output_type="latent").images
|
41 |
if upscaling == 'Yes':
|
42 |
+
image = refiner(prompt=prompt, prompt_2=prompt_2, negative_prompt=negative_prompt, negative_prompt_2=negative_prompt_2, image=int_image, denoising_start=high_noise_frac).images[0] #num_inference_steps=n_steps,
|
43 |
upscaled = upscaler(prompt=prompt, negative_prompt=negative_prompt, image=image, num_inference_steps=5, guidance_scale=0).images[0]
|
44 |
torch.cuda.empty_cache()
|
45 |
return (image, upscaled)
|
|
|
58 |
gr.Radio(['Yes', 'No'], value='No', label='Upscale?'),
|
59 |
gr.Textbox(label='Embedded Prompt'),
|
60 |
gr.Textbox(label='Embedded Negative Prompt'),
|
61 |
+
gr.Slider(minimum=.7, maximum=.99, value=.95, step=.01, label='Refiner Denoise Start %')],
|
62 |
outputs=['image', 'image'],
|
63 |
title="Stable Diffusion XL 1.0 GPU",
|
64 |
description="SDXL 1.0 GPU. <br><br><b>WARNING: Capable of producing NSFW (Softcore) images.</b>",
|