Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -275,7 +275,7 @@ def generate_30(
|
|
| 275 |
sd_image[0].save(filename,optimize=False,compress_level=0)
|
| 276 |
upload_to_ftp(filename)
|
| 277 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 278 |
-
torch.
|
| 279 |
with torch.no_grad():
|
| 280 |
upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
|
| 281 |
downscale1 = upscale.resize((upscale.width // 4, upscale.height // 4), Image.LANCZOS)
|
|
@@ -365,7 +365,7 @@ def generate_60(
|
|
| 365 |
sd_image[0].save(filename,optimize=False,compress_level=0)
|
| 366 |
upload_to_ftp(filename)
|
| 367 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 368 |
-
torch.
|
| 369 |
with torch.no_grad():
|
| 370 |
upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
|
| 371 |
downscale1 = upscale.resize((upscale.width // 4, upscale.height // 4), Image.LANCZOS)
|
|
@@ -456,7 +456,7 @@ def generate_90(
|
|
| 456 |
sd_image[0].save(filename,optimize=False,compress_level=0)
|
| 457 |
upload_to_ftp(filename)
|
| 458 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 459 |
-
torch.
|
| 460 |
with torch.no_grad():
|
| 461 |
upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
|
| 462 |
downscale1 = upscale.resize((upscale.width // 4, upscale.height // 4), Image.LANCZOS)
|
|
|
|
| 275 |
sd_image[0].save(filename,optimize=False,compress_level=0)
|
| 276 |
upload_to_ftp(filename)
|
| 277 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 278 |
+
torch.set_float32_matmul_precision("medium")
|
| 279 |
with torch.no_grad():
|
| 280 |
upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
|
| 281 |
downscale1 = upscale.resize((upscale.width // 4, upscale.height // 4), Image.LANCZOS)
|
|
|
|
| 365 |
sd_image[0].save(filename,optimize=False,compress_level=0)
|
| 366 |
upload_to_ftp(filename)
|
| 367 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 368 |
+
torch.set_float32_matmul_precision("medium")
|
| 369 |
with torch.no_grad():
|
| 370 |
upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
|
| 371 |
downscale1 = upscale.resize((upscale.width // 4, upscale.height // 4), Image.LANCZOS)
|
|
|
|
| 456 |
sd_image[0].save(filename,optimize=False,compress_level=0)
|
| 457 |
upload_to_ftp(filename)
|
| 458 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 459 |
+
torch.set_float32_matmul_precision("medium")
|
| 460 |
with torch.no_grad():
|
| 461 |
upscale = upscaler(sd_image, tiling=True, tile_width=256, tile_height=256)
|
| 462 |
downscale1 = upscale.resize((upscale.width // 4, upscale.height // 4), Image.LANCZOS)
|