Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wan/modules/animate/preprocess/pose2d_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read_img(image, convert='RGB', check_exist=False):
img = Image.open(image)
if convert:
img = img.convert(convert)
except:
except (IOError, OSError):
raise IOError('File error: ', image)
return np.asarray(img)
else:
Expand Down
2 changes: 1 addition & 1 deletion wan/modules/animate/preprocess/process_pipepline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from PIL import Image
try:
import moviepy.editor as mpy
except:
except ImportError:
import moviepy as mpy

from decord import VideoReader
Expand Down
2 changes: 1 addition & 1 deletion wan/modules/animate/preprocess/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def resize_by_area(image, target_area, keep_aspect_ratio=True, divisor=64, paddi
h, w = image.shape[:2]
try:
new_w, new_h = calculate_new_size(w, h, target_area, divisor)
except:
except Exception:
aspect_ratio = w / h

if keep_aspect_ratio:
Expand Down
2 changes: 1 addition & 1 deletion wan/utils/prompt_extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def __init__(self,
)
try:
from .qwen_vl_utils import process_vision_info
except:
except ImportError:
from qwen_vl_utils import process_vision_info
self.process_vision_info = process_vision_info
min_pixels = 256 * 28 * 28
Expand Down