Update app.py
Browse files
app.py
CHANGED
@@ -56,7 +56,6 @@ print_ckpt_structure()
|
|
56 |
# =========================================
|
57 |
|
58 |
from inference.flovd_demo import generate_video
|
59 |
-
|
60 |
def run_inference(prompt, image, pose_type, speed, use_flow_integration, cam_pose_name):
|
61 |
log_buffer = io.StringIO()
|
62 |
sys_stdout = sys.stdout
|
@@ -67,6 +66,11 @@ def run_inference(prompt, image, pose_type, speed, use_flow_integration, cam_pos
|
|
67 |
print("π Starting inference...", flush=True)
|
68 |
os.makedirs("input_images", exist_ok=True)
|
69 |
image_path = "input_images/input_image.png"
|
|
|
|
|
|
|
|
|
|
|
70 |
image.save(image_path)
|
71 |
print(f"πΈ Saved input image to {image_path}", flush=True)
|
72 |
|
|
|
56 |
# =========================================
|
57 |
|
58 |
from inference.flovd_demo import generate_video
|
|
|
59 |
def run_inference(prompt, image, pose_type, speed, use_flow_integration, cam_pose_name):
|
60 |
log_buffer = io.StringIO()
|
61 |
sys_stdout = sys.stdout
|
|
|
66 |
print("π Starting inference...", flush=True)
|
67 |
os.makedirs("input_images", exist_ok=True)
|
68 |
image_path = "input_images/input_image.png"
|
69 |
+
|
70 |
+
# β
Convert NumPy to PIL if necessary
|
71 |
+
if not isinstance(image, Image.Image):
|
72 |
+
image = Image.fromarray(image.astype("uint8"))
|
73 |
+
|
74 |
image.save(image_path)
|
75 |
print(f"πΈ Saved input image to {image_path}", flush=True)
|
76 |
|