Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,14 +11,14 @@ tqdm.monitor_interval = 0
|
|
11 |
|
12 |
# Load the diffusion pipelines
|
13 |
pipe1 = StableDiffusionXLPipeline.from_pretrained(
|
14 |
-
"kayfahaarukku/UrangDiffusion-1.
|
15 |
torch_dtype=torch.float16,
|
16 |
custom_pipeline="lpw_stable_diffusion_xl",
|
17 |
)
|
18 |
pipe1.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe1.scheduler.config)
|
19 |
|
20 |
pipe2 = StableDiffusionXLPipeline.from_pretrained(
|
21 |
-
"kayfahaarukku/UrangDiffusion-1.
|
22 |
torch_dtype=torch.float16,
|
23 |
custom_pipeline="lpw_stable_diffusion_xl",
|
24 |
)
|
@@ -43,7 +43,7 @@ def generate_comparison(prompt, negative_prompt, use_defaults, resolution, guida
|
|
43 |
|
44 |
width, height = map(int, resolution.split('x'))
|
45 |
|
46 |
-
# Generate image with UrangDiffusion-1.
|
47 |
image1 = pipe1(
|
48 |
prompt,
|
49 |
negative_prompt=negative_prompt,
|
@@ -56,7 +56,7 @@ def generate_comparison(prompt, negative_prompt, use_defaults, resolution, guida
|
|
56 |
callback_steps=1
|
57 |
).images[0]
|
58 |
|
59 |
-
# Generate image with UrangDiffusion-1.
|
60 |
image2 = pipe2(
|
61 |
prompt,
|
62 |
negative_prompt=negative_prompt,
|
@@ -85,7 +85,7 @@ def reset_inputs():
|
|
85 |
|
86 |
with gr.Blocks(title="UrangDiffusion Comparison Demo", theme="NoCrypt/[email protected]") as demo:
|
87 |
gr.HTML(
|
88 |
-
"<h1>UrangDiffusion 1.
|
89 |
"This demo showcases a comparison between UrangDiffusion 1.1 and 1.2."
|
90 |
)
|
91 |
with gr.Row():
|
@@ -110,8 +110,8 @@ with gr.Blocks(title="UrangDiffusion Comparison Demo", theme="NoCrypt/[email protected]
|
|
110 |
|
111 |
with gr.Column():
|
112 |
with gr.Row():
|
113 |
-
output_image1 = gr.Image(type="pil", label="UrangDiffusion 1.
|
114 |
-
output_image2 = gr.Image(type="pil", label="UrangDiffusion 1.
|
115 |
with gr.Accordion("Parameters", open=False):
|
116 |
gr.Markdown(
|
117 |
"""
|
|
|
11 |
|
12 |
# Load the diffusion pipelines
|
13 |
pipe1 = StableDiffusionXLPipeline.from_pretrained(
|
14 |
+
"kayfahaarukku/UrangDiffusion-1.2",
|
15 |
torch_dtype=torch.float16,
|
16 |
custom_pipeline="lpw_stable_diffusion_xl",
|
17 |
)
|
18 |
pipe1.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe1.scheduler.config)
|
19 |
|
20 |
pipe2 = StableDiffusionXLPipeline.from_pretrained(
|
21 |
+
"kayfahaarukku/UrangDiffusion-1.3",
|
22 |
torch_dtype=torch.float16,
|
23 |
custom_pipeline="lpw_stable_diffusion_xl",
|
24 |
)
|
|
|
43 |
|
44 |
width, height = map(int, resolution.split('x'))
|
45 |
|
46 |
+
# Generate image with UrangDiffusion-1.2
|
47 |
image1 = pipe1(
|
48 |
prompt,
|
49 |
negative_prompt=negative_prompt,
|
|
|
56 |
callback_steps=1
|
57 |
).images[0]
|
58 |
|
59 |
+
# Generate image with UrangDiffusion-1.3
|
60 |
image2 = pipe2(
|
61 |
prompt,
|
62 |
negative_prompt=negative_prompt,
|
|
|
85 |
|
86 |
with gr.Blocks(title="UrangDiffusion Comparison Demo", theme="NoCrypt/[email protected]") as demo:
|
87 |
gr.HTML(
|
88 |
+
"<h1>UrangDiffusion 1.2 vs 1.3 Comparison Demo</h1>"
|
89 |
"This demo showcases a comparison between UrangDiffusion 1.1 and 1.2."
|
90 |
)
|
91 |
with gr.Row():
|
|
|
110 |
|
111 |
with gr.Column():
|
112 |
with gr.Row():
|
113 |
+
output_image1 = gr.Image(type="pil", label="UrangDiffusion 1.2")
|
114 |
+
output_image2 = gr.Image(type="pil", label="UrangDiffusion 1.3")
|
115 |
with gr.Accordion("Parameters", open=False):
|
116 |
gr.Markdown(
|
117 |
"""
|