Mitsua commited on
Commit
8f96c0d
β€’
1 Parent(s): b4de5cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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
- yield image_w_logo, license_str, detected_public_fictional_characters_info, seed
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
- return infer_impl(prompt, style, lang, negative_prompt, seed, randomize_seed, ar, guidance_scale, num_inference_steps, progress)
 
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