Skip to content
Merged
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
4 changes: 2 additions & 2 deletions examples/diffusers/quantization/models_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def get_model_filter_func(model_type: ModelType) -> Callable[[str], bool]:
ModelType.FLUX_SCHNELL: _FLUX_BASE_CONFIG,
ModelType.LTX_VIDEO_DEV: {
"backbone": "transformer",
"dataset": _SD_PROMPTS_DATASET,
"dataset": _OPENVID_DATASET,
"inference_extra_args": {
"height": 512,
"width": 704,
Expand All @@ -161,7 +161,7 @@ def get_model_filter_func(model_type: ModelType) -> Callable[[str], bool]:
},
ModelType.LTX2: {
"backbone": "transformer",
"dataset": _SD_PROMPTS_DATASET,
"dataset": _OPENVID_DATASET,
"inference_extra_args": {
"height": 768,
"width": 1280,
Expand Down
2 changes: 1 addition & 1 deletion examples/diffusers/quantization/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def check_conv_and_mha(backbone, if_fp4, quantize_mha):
def filter_func_ltx_video(name: str) -> bool:
"""Filter function specifically for LTX-Video models."""
pattern = re.compile(
r".*(proj_in|time_embed|caption_projection|proj_out|patchify_proj|adaln_single).*"
r".*(proj_in|time_embed|caption_projection|proj_out|patchify_proj|adaln_single|transformer_blocks\.(0|1|2|45|46|47)\.).*"
)
return pattern.match(name) is not None
Comment on lines 70 to 75
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

This also changes the LTX_VIDEO_DEV recipe.

filter_func_ltx_video() is reused for both ModelType.LTX_VIDEO_DEV and ModelType.LTX2, so adding transformer_blocks.(0|1|2|45|46|47) here widens the higher-precision exclusion list for both models, not just LTX2. If the intent is the PR description’s LTX2-only recipe update, this needs a separate LTX2-specific filter instead of changing the shared LTX helper.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/diffusers/quantization/utils.py` around lines 70 - 75, Revert the
shared helper filter_func_ltx_video back to its original LTX-Video pattern (so
it continues to serve ModelType.LTX_VIDEO_DEV unchanged), and add a new
LTX2-specific filter (e.g., filter_func_ltx2_video) that includes the extra
transformer_blocks.(0|1|2|45|46|47) alternation; then update the recipe usage so
ModelType.LTX2 uses filter_func_ltx2_video while ModelType.LTX_VIDEO_DEV
continues to use filter_func_ltx_video. Ensure you only change the pattern in
the new filter_func_ltx2_video and swap references where ModelType.LTX2 is
handled, leaving filter_func_ltx_video’s signature and behavior untouched.


Expand Down
Loading