Spaces:
Running
on
Zero
Running
on
Zero
debug.py
CHANGED
@@ -6,6 +6,7 @@ import time
|
|
6 |
from huggingface_hub import CommitScheduler, HfApi
|
7 |
from PIL import Image
|
8 |
import numpy as np
|
|
|
9 |
|
10 |
APP_VERSION = "0_3"
|
11 |
HF_DATASET_REPO = "LPX55/upscaler_logs" # Change to your dataset repo
|
@@ -34,6 +35,11 @@ def save_image(image_id, image_path: Image.Image) -> None:
|
|
34 |
print("Image ID Type: " + str(type(image_id)))
|
35 |
save_image_path = os.path.join(IMAGE_DIR, f"{image_id}")
|
36 |
print("Save image path: " + save_image_path)
|
|
|
|
|
|
|
|
|
|
|
37 |
with scheduler.lock:
|
38 |
try:
|
39 |
# print("Image path: " + image_path)
|
|
|
6 |
from huggingface_hub import CommitScheduler, HfApi
|
7 |
from PIL import Image
|
8 |
import numpy as np
|
9 |
+
from diffusers.utils import load_image
|
10 |
|
11 |
APP_VERSION = "0_3"
|
12 |
HF_DATASET_REPO = "LPX55/upscaler_logs" # Change to your dataset repo
|
|
|
35 |
print("Image ID Type: " + str(type(image_id)))
|
36 |
save_image_path = os.path.join(IMAGE_DIR, f"{image_id}")
|
37 |
print("Save image path: " + save_image_path)
|
38 |
+
try:
|
39 |
+
loaded = load_image(image_path)
|
40 |
+
print("Loaded Type: " + str(type(loaded)))
|
41 |
+
except Exception as e:
|
42 |
+
print(f"Error loading image: {str(e)}")
|
43 |
with scheduler.lock:
|
44 |
try:
|
45 |
# print("Image path: " + image_path)
|