from datetime import datetime
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ import copy
|
|
| 8 |
import math
|
| 9 |
import time
|
| 10 |
import random
|
|
|
|
| 11 |
|
| 12 |
try:
|
| 13 |
import spaces
|
|
@@ -23,6 +24,7 @@ import uuid
|
|
| 23 |
|
| 24 |
from gradio_imageslider import ImageSlider
|
| 25 |
from PIL import Image
|
|
|
|
| 26 |
from SUPIR.util import HWC3, upscale_image, fix_resize, convert_dtype, create_SUPIR_model, load_QF_ckpt
|
| 27 |
from huggingface_hub import hf_hub_download
|
| 28 |
import pillow_heif
|
|
@@ -51,6 +53,10 @@ parser.add_argument("--decoder_tile_size", type=int, default=64)
|
|
| 51 |
parser.add_argument("--load_8bit_llava", action='store_true', default=False)
|
| 52 |
args = parser.parse_args()
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
if torch.cuda.device_count() > 0:
|
| 55 |
SUPIR_device = 'cuda:0'
|
| 56 |
|
|
|
|
| 8 |
import math
|
| 9 |
import time
|
| 10 |
import random
|
| 11 |
+
from datetime import datetime
|
| 12 |
|
| 13 |
try:
|
| 14 |
import spaces
|
|
|
|
| 24 |
|
| 25 |
from gradio_imageslider import ImageSlider
|
| 26 |
from PIL import Image
|
| 27 |
+
import imageio.v3 as iio
|
| 28 |
from SUPIR.util import HWC3, upscale_image, fix_resize, convert_dtype, create_SUPIR_model, load_QF_ckpt
|
| 29 |
from huggingface_hub import hf_hub_download
|
| 30 |
import pillow_heif
|
|
|
|
| 53 |
parser.add_argument("--load_8bit_llava", action='store_true', default=False)
|
| 54 |
args = parser.parse_args()
|
| 55 |
|
| 56 |
+
input_image_debug_value = [None]
|
| 57 |
+
prompt_debug_value = [None]
|
| 58 |
+
upscale_debug_value = [None]
|
| 59 |
+
|
| 60 |
if torch.cuda.device_count() > 0:
|
| 61 |
SUPIR_device = 'cuda:0'
|
| 62 |
|