Skip to content

Commit 720519d

Browse files
committed
raise value error
1 parent 5c63cc0 commit 720519d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/diffusers/models/transformers/transformer_hunyuan_video.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,12 @@ def __init__(
893893
image_condition_type: Optional[str] = None,
894894
) -> None:
895895
super().__init__()
896-
assert image_condition_type is None or image_condition_type in ["latent_concat", "token_replace"]
896+
897+
supported_image_condition_types = ["latent_concat", "token_replace"]
898+
if image_condition_type is not None and image_condition_type not in supported_image_condition_types:
899+
raise ValueError(
900+
f"Invalid `image_condition_type` ({image_condition_type}). Supported ones are: {supported_image_condition_types}"
901+
)
897902

898903
inner_dim = num_attention_heads * attention_head_dim
899904
out_channels = out_channels or in_channels

0 commit comments

Comments
 (0)