Update app.py
Browse files
app.py
CHANGED
|
@@ -290,7 +290,8 @@ def generate_images_30(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width,
|
|
| 290 |
upscale_1 = upscaler_2(sd_image_pil_16bit, tiling=True, tile_width=256, tile_height=256)
|
| 291 |
upscale_2 = upscaler_2(upscale_1, tiling=True, tile_width=256, tile_height=256)
|
| 292 |
print('-- got 4K 16-bit upscaled PIL image --')
|
| 293 |
-
|
|
|
|
| 294 |
|
| 295 |
torch.cuda.empty_cache()
|
| 296 |
|
|
@@ -351,7 +352,8 @@ def generate_images_60(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width,
|
|
| 351 |
upscale_1 = upscaler_2(sd_image_pil_16bit, tiling=True, tile_width=256, tile_height=256)
|
| 352 |
upscale_2 = upscaler_2(upscale_1, tiling=True, tile_width=256, tile_height=256)
|
| 353 |
print('-- got 4K 16-bit upscaled PIL image --')
|
| 354 |
-
|
|
|
|
| 355 |
|
| 356 |
torch.cuda.empty_cache()
|
| 357 |
|
|
@@ -412,7 +414,8 @@ def generate_images_110(prompt, neg_prompt_1, neg_prompt_2, neg_prompt_3, width,
|
|
| 412 |
upscale_1 = upscaler_2(sd_image_pil_16bit, tiling=True, tile_width=256, tile_height=256)
|
| 413 |
upscale_2 = upscaler_2(upscale_1, tiling=True, tile_width=256, tile_height=256)
|
| 414 |
print('-- got 4K 16-bit upscaled PIL image --')
|
| 415 |
-
|
|
|
|
| 416 |
|
| 417 |
torch.cuda.empty_cache()
|
| 418 |
|
|
|
|
| 290 |
upscale_1 = upscaler_2(sd_image_pil_16bit, tiling=True, tile_width=256, tile_height=256)
|
| 291 |
upscale_2 = upscaler_2(upscale_1, tiling=True, tile_width=256, tile_height=256)
|
| 292 |
print('-- got 4K 16-bit upscaled PIL image --')
|
| 293 |
+
|
| 294 |
+
downscaled_upscale = upscale_2.resize((upscale2.width // 8, upscale2.height // 8), Image.LANCZOS)
|
| 295 |
|
| 296 |
torch.cuda.empty_cache()
|
| 297 |
|
|
|
|
| 352 |
upscale_1 = upscaler_2(sd_image_pil_16bit, tiling=True, tile_width=256, tile_height=256)
|
| 353 |
upscale_2 = upscaler_2(upscale_1, tiling=True, tile_width=256, tile_height=256)
|
| 354 |
print('-- got 4K 16-bit upscaled PIL image --')
|
| 355 |
+
|
| 356 |
+
downscaled_upscale = upscale_2.resize((upscale2.width // 8, upscale2.height // 8), Image.LANCZOS)
|
| 357 |
|
| 358 |
torch.cuda.empty_cache()
|
| 359 |
|
|
|
|
| 414 |
upscale_1 = upscaler_2(sd_image_pil_16bit, tiling=True, tile_width=256, tile_height=256)
|
| 415 |
upscale_2 = upscaler_2(upscale_1, tiling=True, tile_width=256, tile_height=256)
|
| 416 |
print('-- got 4K 16-bit upscaled PIL image --')
|
| 417 |
+
|
| 418 |
+
downscaled_upscale = upscale_2.resize((upscale2.width // 8, upscale2.height // 8), Image.LANCZOS)
|
| 419 |
|
| 420 |
torch.cuda.empty_cache()
|
| 421 |
|