Skip to content

Add negative_prompt parameter to GLMImagePipeline #13421

@akshan-main

Description

@akshan-main

Description

GLMImagePipeline.__call__() supports negative_prompt_embeds but does not accept a negative_prompt string parameter. When CFG is active (guidance_scale > 1), the unconditional prompt is hardcoded to "" with no way for users to provide a custom negative prompt.

This is the same pattern that was in Flux2KleinPipeline before #13420.

Users should be able to pass negative_prompt="some string" directly, similar to other pipelines that support CFG.

The only way to use a custom negative prompt right now is to pre-encode it and pass negative_prompt_embeds. I will create a PR to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions