huggingface / huggingface/diffusers

how to use zimage and flux2 with negative prompt?

Open
#13,416 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
34.5k
Forks
7.3k
Avg merge
3d 3h
Merged PRs (30d)
91

Description

Describe the bug
from pipeline_flux_with_cfg import FluxCFGPipeline

it allows to use negative prompt with flux, is there any similar stuff with zimage and flux2?

I means diffusers.ZImagePipeline with Tongyi-MAI/Z-Image-Turbo and diffusers.flux2kleinpipeline with black-forest-labs/FLUX.2-klein-9B I see there is negative_prompt_embeds: str | list[str] | None = None, in the call() function but how to convert negative_prompt to negative_prompt_embeds?

Reproduction

N/A

Logs

System Info

ubuntu22.04-cuda12.4.0-py311-torch2.8.0

Who can help?

@yiyixuxu @DN6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the referenced pipeline_flux_with_cfg entry point and the call implementations for diffusers.ZImagePipeline and diffusers.flux2kleinpipeline. Trace how negative_prompt_embeds is accepted and determine the supported path for negative_prompt with Tongyi-MAI/Z-Image-Turbo and black-forest-labs/FLUX.2-klein-9B; done should clarify or establish that usage with an appropriate test or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.