Skip to content

512×512 resolution generates only top portion of image #21

@hyeon9698

Description

@hyeon9698

Thank you for sharing this great research with the community

Issue

When generating at 512×512, only the top portion of the image is generated. 1024×1024 works fine.

Code

import torch
from diffusers.pipelines.glm_image import GlmImagePipeline

pipe = GlmImagePipeline.from_pretrained("zai-org/GLM-Image", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()

image = pipe(
    prompt="A dog",
    height=512, width=512,
    num_inference_steps=50,
    guidance_scale=1.5,
    generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]

Results

Image

prompt="A dog"

Image

prompt="An apple",

The README shows 512×512 benchmark, so I expected it to work. Am I missing something in my configuration, or is there a workaround to make 512×512 generation work correctly?
However, 1024×1024 works perfectly.

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions