Spaces:
Runtime error
Runtime error
Yjiggfghhjnjj
commited on
Commit
•
01cb3ae
1
Parent(s):
badba56
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def run_comparison(prompt: str,
|
|
57 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
58 |
if not use_negative_prompt:
|
59 |
negative_prompt = ""
|
60 |
-
image_r3=RealVisXLv3_pipe(prompt=prompt,
|
61 |
negative_prompt=negative_prompt,
|
62 |
width=width,
|
63 |
height=height,
|
@@ -66,11 +66,10 @@ def run_comparison(prompt: str,
|
|
66 |
num_images_per_prompt=num_images_per_prompt,
|
67 |
cross_attention_kwargs={"scale": 0.65},
|
68 |
output_type="pil",
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
image_r4=RealVisXLv4_pipe(prompt=prompt,
|
74 |
negative_prompt=negative_prompt,
|
75 |
width=width,
|
76 |
height=height,
|
@@ -79,10 +78,10 @@ def run_comparison(prompt: str,
|
|
79 |
num_images_per_prompt=num_images_per_prompt,
|
80 |
cross_attention_kwargs={"scale": 0.65},
|
81 |
output_type="pil",
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
|
87 |
examples = ["A dignified beaver wearing glasses, a vest, and colorful neck tie.",
|
88 |
"The spirit of a tamagotchi wandering in the city of Barcelona",
|
@@ -184,7 +183,7 @@ with gr.Blocks() as demo:
|
|
184 |
guidance_scale,
|
185 |
randomize_seed,
|
186 |
],
|
187 |
-
outputs=image_outputs,
|
188 |
api_name="run",
|
189 |
)
|
190 |
use_negative_prompt.change(
|
|
|
57 |
seed = int(randomize_seed_fn(seed, randomize_seed))
|
58 |
if not use_negative_prompt:
|
59 |
negative_prompt = ""
|
60 |
+
image_r3 = RealVisXLv3_pipe(prompt=prompt,
|
61 |
negative_prompt=negative_prompt,
|
62 |
width=width,
|
63 |
height=height,
|
|
|
66 |
num_images_per_prompt=num_images_per_prompt,
|
67 |
cross_attention_kwargs={"scale": 0.65},
|
68 |
output_type="pil",
|
69 |
+
).images
|
70 |
+
image_paths_r3 = [save_image(img) for img in image_r3]
|
71 |
+
|
72 |
+
image_r4 = RealVisXLv4_pipe(prompt=prompt,
|
|
|
73 |
negative_prompt=negative_prompt,
|
74 |
width=width,
|
75 |
height=height,
|
|
|
78 |
num_images_per_prompt=num_images_per_prompt,
|
79 |
cross_attention_kwargs={"scale": 0.65},
|
80 |
output_type="pil",
|
81 |
+
).images
|
82 |
+
image_paths_r4 = [save_image(img) for img in image_r4]
|
83 |
+
|
84 |
+
return image_paths_r3, image_paths_r4, seed
|
85 |
|
86 |
examples = ["A dignified beaver wearing glasses, a vest, and colorful neck tie.",
|
87 |
"The spirit of a tamagotchi wandering in the city of Barcelona",
|
|
|
183 |
guidance_scale,
|
184 |
randomize_seed,
|
185 |
],
|
186 |
+
outputs=[image_outputs, seed],
|
187 |
api_name="run",
|
188 |
)
|
189 |
use_negative_prompt.change(
|