Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -155,8 +155,6 @@ def infer_impl(
|
|
155 |
if randomize_seed:
|
156 |
seed = random.randint(0, np.iinfo(np.int32).max)
|
157 |
|
158 |
-
yield None, None, None, seed
|
159 |
-
|
160 |
generator = torch.Generator(device=device).manual_seed(seed)
|
161 |
if style_to_prompt[style] != "":
|
162 |
prompt = style_to_prompt[style] + ", " + prompt
|
@@ -236,7 +234,7 @@ def infer_impl(
|
|
236 |
image_w_logo.paste(image)
|
237 |
image_w_logo.paste(likes_logo_top_img, (image.width - likes_logo_top_img.width,0), likes_logo_top_img)
|
238 |
image_w_logo.paste(likes_logo_img, (0, image.height))
|
239 |
-
|
240 |
|
241 |
def infer(
|
242 |
prompt,
|
@@ -254,7 +252,8 @@ def infer(
|
|
254 |
):
|
255 |
if any([a in prompt for a in bad_words]):
|
256 |
return None, "## <span style='color:orangered'>ERROR: Invalid prompt / δΈι©εγͺγγγ³γγ </span>", None, seed
|
257 |
-
|
|
|
258 |
|
259 |
|
260 |
# Seafoam theme based on
|
|
|
155 |
if randomize_seed:
|
156 |
seed = random.randint(0, np.iinfo(np.int32).max)
|
157 |
|
|
|
|
|
158 |
generator = torch.Generator(device=device).manual_seed(seed)
|
159 |
if style_to_prompt[style] != "":
|
160 |
prompt = style_to_prompt[style] + ", " + prompt
|
|
|
234 |
image_w_logo.paste(image)
|
235 |
image_w_logo.paste(likes_logo_top_img, (image.width - likes_logo_top_img.width,0), likes_logo_top_img)
|
236 |
image_w_logo.paste(likes_logo_img, (0, image.height))
|
237 |
+
return image_w_logo, license_str, detected_public_fictional_characters_info, seed
|
238 |
|
239 |
def infer(
|
240 |
prompt,
|
|
|
252 |
):
|
253 |
if any([a in prompt for a in bad_words]):
|
254 |
return None, "## <span style='color:orangered'>ERROR: Invalid prompt / δΈι©εγͺγγγ³γγ </span>", None, seed
|
255 |
+
yield None, None, None, seed
|
256 |
+
yield infer_impl(prompt, style, lang, negative_prompt, seed, randomize_seed, ar, guidance_scale, num_inference_steps, progress)
|
257 |
|
258 |
|
259 |
# Seafoam theme based on
|