Skip to content

Add validation ensuring negative_prompt_embeds is not None when CFG is enabled#2351

Merged
regisss merged 2 commits intohuggingface:mainfrom
HabanaAI:main_pipeline_wani2v_negative_prompt_embeds_fix
Dec 2, 2025
Merged

Add validation ensuring negative_prompt_embeds is not None when CFG is enabled#2351
regisss merged 2 commits intohuggingface:mainfrom
HabanaAI:main_pipeline_wani2v_negative_prompt_embeds_fix

Conversation

@gplutop7
Copy link
Collaborator

Adds an early input check in the call method to guarantee that negative_prompt_embeds is provided when do_classifier_free_guidance=True.
This prevents null-like accesses detected by Coverit,

@gplutop7 gplutop7 requested a review from regisss as a code owner November 28, 2025 09:48
@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
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 6c4320a into huggingface:main Dec 2, 2025
3 of 5 checks passed
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.

3 participants