Skip to content

fix: log ignored longcat positional id arguments#13900

Open
wunianze666-netizen wants to merge 1 commit into
huggingface:mainfrom
wunianze666-netizen:fix/longcat-prepare-pos-logging
Open

fix: log ignored longcat positional id arguments#13900
wunianze666-netizen wants to merge 1 commit into
huggingface:mainfrom
wunianze666-netizen:fix/longcat-prepare-pos-logging

Conversation

@wunianze666-netizen

Copy link
Copy Markdown

Summary

This PR replaces direct print() warnings in the LongCat positional-id helpers with standard logger warnings and fixes the Unknown type error message.

Problem

prepare_pos_ids() in both LongCat image pipelines currently prints warnings directly to stdout when callers pass ignored arguments. That is noisy for library consumers and harder to capture in tests. The helper also raises a KeyError with a small typo in the message.

Changes

  • replace direct print() calls with logger.warning() in both LongCat image helpers
  • fix Unknow type to Unknown type
  • add a small regression test covering both helpers

Verification

  • python -m py_compile src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py src/diffusers/pipelines/longcat_image/pipeline_longcat_image_edit.py tests/pipelines/longcat_image/test_prepare_pos_ids.py
  • Not run: pytest is not available in this environment, so I could not execute the new test locally.

@github-actions github-actions Bot added tests pipelines size/M PR with diff < 200 LOC labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pipelines size/M PR with diff < 200 LOC tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant