alfredplpl commited on
Commit
0731c3b
1 Parent(s): 5810cdb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -48,7 +48,7 @@ def error_str(error, title="Error"):
48
  return f"""#### {title}
49
  {error}""" if error else ""
50
 
51
-
52
  def inference(prompt, guidance, steps, image_size="Square", seed=0, img=None, strength=0.5, neg_prompt="", cool_japan_type="Anime", disable_auto_prompt_correction=False):
53
 
54
  generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
@@ -145,7 +145,6 @@ def auto_prompt_correction(prompt_ui,neg_prompt_ui,cool_japan_type_ui,disable_au
145
 
146
  return prompt,neg_prompt
147
 
148
- @spaces.GPU
149
  def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator,superreso=False):
150
  global pipe, upscaler
151
  if(superreso):
@@ -178,7 +177,6 @@ def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator,sup
178
 
179
  return result.images[0]
180
 
181
- @spaces.GPU
182
  def img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator,superreso=False):
183
  ratio = min(height / img.height, width / img.width)
184
  img = img.resize((int(img.width * ratio), int(img.height * ratio)), Image.LANCZOS)
 
48
  return f"""#### {title}
49
  {error}""" if error else ""
50
 
51
+ @spaces.GPU
52
  def inference(prompt, guidance, steps, image_size="Square", seed=0, img=None, strength=0.5, neg_prompt="", cool_japan_type="Anime", disable_auto_prompt_correction=False):
53
 
54
  generator = torch.Generator('cuda').manual_seed(seed) if seed != 0 else None
 
145
 
146
  return prompt,neg_prompt
147
 
 
148
  def txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator,superreso=False):
149
  global pipe, upscaler
150
  if(superreso):
 
177
 
178
  return result.images[0]
179
 
 
180
  def img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator,superreso=False):
181
  ratio = min(height / img.height, width / img.width)
182
  img = img.resize((int(img.width * ratio), int(img.height * ratio)), Image.LANCZOS)