1inkusFace commited on
Commit
aaed876
·
verified ·
1 Parent(s): 25415dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -12
app.py CHANGED
@@ -156,13 +156,9 @@ def infer_60(
156
  upscale2 = upscaler_2(upscale, tiling=True, tile_width=256, tile_height=256)
157
  print('-- got upscaled image --')
158
  downscale = upscale2.resize((upscale2.width // 4, upscale2.height // 4),Image.LANCZOS)
159
- downscale2 = downscale.resize((downscale.width // 4, downscale.height // 4),Image.LANCZOS)
160
  upscale_path = f"sd35ll_upscale_{timestamp}.png"
161
- upscale2_path = f"sd35ll_upscale2_{timestamp}.png"
162
  downscale.save(upscale_path,optimize=False,compress_level=0)
163
- downscale2.save(upscale2_path,optimize=False,compress_level=0)
164
  pyx.upload_to_ftp(upscale_path)
165
- pyx.upload_to_ftp(upscale2_path)
166
  return sd_image, prompt
167
 
168
  @spaces.GPU(duration=100)
@@ -210,13 +206,9 @@ def infer_90(
210
  upscale2 = upscaler_2(upscale, tiling=True, tile_width=256, tile_height=256)
211
  print('-- got upscaled image --')
212
  downscale = upscale2.resize((upscale2.width // 4, upscale2.height // 4),Image.LANCZOS)
213
- downscale2 = downscale.resize((downscale.width // 4, downscale.height // 4),Image.LANCZOS)
214
  upscale_path = f"sd35ll_upscale_{timestamp}.png"
215
- upscale2_path = f"sd35ll_upscale2_{timestamp}.png"
216
  downscale.save(upscale_path,optimize=False,compress_level=0)
217
- downscale2.save(upscale2_path,optimize=False,compress_level=0)
218
  pyx.upload_to_ftp(upscale_path)
219
- pyx.upload_to_ftp(upscale2_path)
220
  return sd_image, prompt
221
 
222
  @spaces.GPU(duration=120)
@@ -264,13 +256,9 @@ def infer_110(
264
  upscale2 = upscaler_2(upscale, tiling=True, tile_width=256, tile_height=256)
265
  print('-- got upscaled image --')
266
  downscale = upscale2.resize((upscale2.width // 4, upscale2.height // 4),Image.LANCZOS)
267
- downscale2 = downscale.resize((downscale.width // 4, downscale.height // 4),Image.LANCZOS)
268
  upscale_path = f"sd35ll_upscale_{timestamp}.png"
269
- upscale2_path = f"sd35ll_upscale2_{timestamp}.png"
270
  downscale.save(upscale_path,optimize=False,compress_level=0)
271
- downscale2.save(upscale2_path,optimize=False,compress_level=0)
272
  pyx.upload_to_ftp(upscale_path)
273
- pyx.upload_to_ftp(upscale2_path)
274
  return sd_image, prompt
275
 
276
  css = """
 
156
  upscale2 = upscaler_2(upscale, tiling=True, tile_width=256, tile_height=256)
157
  print('-- got upscaled image --')
158
  downscale = upscale2.resize((upscale2.width // 4, upscale2.height // 4),Image.LANCZOS)
 
159
  upscale_path = f"sd35ll_upscale_{timestamp}.png"
 
160
  downscale.save(upscale_path,optimize=False,compress_level=0)
 
161
  pyx.upload_to_ftp(upscale_path)
 
162
  return sd_image, prompt
163
 
164
  @spaces.GPU(duration=100)
 
206
  upscale2 = upscaler_2(upscale, tiling=True, tile_width=256, tile_height=256)
207
  print('-- got upscaled image --')
208
  downscale = upscale2.resize((upscale2.width // 4, upscale2.height // 4),Image.LANCZOS)
 
209
  upscale_path = f"sd35ll_upscale_{timestamp}.png"
 
210
  downscale.save(upscale_path,optimize=False,compress_level=0)
 
211
  pyx.upload_to_ftp(upscale_path)
 
212
  return sd_image, prompt
213
 
214
  @spaces.GPU(duration=120)
 
256
  upscale2 = upscaler_2(upscale, tiling=True, tile_width=256, tile_height=256)
257
  print('-- got upscaled image --')
258
  downscale = upscale2.resize((upscale2.width // 4, upscale2.height // 4),Image.LANCZOS)
 
259
  upscale_path = f"sd35ll_upscale_{timestamp}.png"
 
260
  downscale.save(upscale_path,optimize=False,compress_level=0)
 
261
  pyx.upload_to_ftp(upscale_path)
 
262
  return sd_image, prompt
263
 
264
  css = """