Skip to content

Fix null handling when padding optional negative prompt batches#2357

Merged
regisss merged 1 commit intohuggingface:mainfrom
HabanaAI:main_pipeline_qwenimage_prompts_embeds_fix
Dec 22, 2025
Merged

Fix null handling when padding optional negative prompt batches#2357
regisss merged 1 commit intohuggingface:mainfrom
HabanaAI:main_pipeline_qwenimage_prompts_embeds_fix

Conversation

@gplutop7
Copy link
Collaborator

This change fixes a runtime crash when batching inputs where negative_prompt_embeds or its mask is not provided.
The update was required by the Coverity static analysis tool, which correctly detected a possible null dereference in the padding logic.

@gplutop7 gplutop7 requested a review from regisss as a code owner December 19, 2025 14:58
@gplutop7
Copy link
Collaborator Author

@regisss please also merge this PR into the v1.21-release branch

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@IlyasMoutawwakil IlyasMoutawwakil left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@regisss regisss left a comment

Choose a reason for hiding this comment

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

LGTM!

@regisss regisss merged commit 6d6ce7c into huggingface:main Dec 22, 2025
3 of 5 checks passed
@regisss
Copy link
Collaborator

regisss commented Dec 22, 2025

@regisss please also merge this PR into the v1.21-release branch

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants