Skip to content

Add negative_prompt to Flux2KleinPipeline#13420

Open
akshan-main wants to merge 1 commit intohuggingface:mainfrom
akshan-main:add-negative-prompt-flux2-klein
Open

Add negative_prompt to Flux2KleinPipeline#13420
akshan-main wants to merge 1 commit intohuggingface:mainfrom
akshan-main:add-negative-prompt-flux2-klein

Conversation

@akshan-main
Copy link
Copy Markdown

What does this PR do?

Fixes #13416

Adds negative_prompt parameter to Flux2KleinPipeline.__call__(). Previously, the unconditional prompt was hardcoded to "" when CFG was active, with no way for users to provide a custom negative prompt.

Changes:

  • Added negative_prompt: str | list[str] | None = None parameter
  • Falls back to "" when None (backward compatible)
  • Added length validation when both prompt and negative_prompt are lists
  • Fixed negative_prompt_embeds type hint from str | list[str] to torch.Tensor
  • Updated docstrings

Fixes #13416

Before submitting

Who can review?

@asomoza @sayakpaul

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.

how to use zimage and flux2 with negative prompt?

1 participant