Skip to content
Python

small fixes

DeepBeepMeepfd379e6e90f3
diff --git a/i2v_inference.py b/i2v_inference.py
index 9b5a5cc..fc1cd5a 100644
--- a/i2v_inference.py
+++ b/i2v_inference.py
@@ -627,7 +627,9 @@ def main():
user_prompt,
input_img,
frame_num=frame_count,
- max_area=MAX_AREA_CONFIGS[f"{width}*{height}"], # or you can pass your custom
+ width=width,
+ height=height,
+ # max_area=MAX_AREA_CONFIGS[f"{width}*{height}"], # or you can pass your custom
shift=args.flow_shift,
sampling_steps=args.steps,
guide_scale=args.guidance_scale,
diff --git a/wgp.py b/wgp.py
index 1519b17..74c70ce 100644
--- a/wgp.py
+++ b/wgp.py
@@ -764,8 +764,8 @@ def load_queue_action(filepath, state, evt:gr.EventData):
primary_preview_pil_list, secondary_preview_pil_list = get_preview_images(params)
- start_b64 = [pil_to_base64_uri(primary_preview_pil_list[0], format="jpeg", quality=70)] if primary_preview_pil_list and primary_preview_pil_list[0] else None
- end_b64 = [pil_to_base64_uri(secondary_preview_pil_list[0], format="jpeg", quality=70)] if secondary_preview_pil_list and secondary_preview_pil_list[0] else None
+ start_b64 = [pil_to_base64_uri(primary_preview_pil_list[0], format="jpeg", quality=70)] if isinstance(primary_preview_pil_list, list) and primary_preview_pil_list else None
+ end_b64 = [pil_to_base64_uri(secondary_preview_pil_list[0], format="jpeg", quality=70)] if isinstance(secondary_preview_pil_list, list) and secondary_preview_pil_list else None
top_level_start_image = params.get("image_start") or params.get("image_refs")
top_level_end_image = params.get("image_end")