Skip to content

Trouble with Setting Custom Image Resolution #9

@nullarch

Description

@nullarch

I don't want a 512x512 resolution result, but want to set the resolution. In the source code below, I set the width to 512 and the height to 768. However, the result is a 512x512 resolution image.

Am I making a mistake or is there something I should refer to?

@torch.no_grad()
def text2image(
    model,
    prompt:  List[str],
    controller,
    num_inference_steps: int = 50,
    guidance_scale: Optional[float] = 7.5,
    generator: Optional[torch.Generator] = None,
    latent: Optional[torch.FloatTensor] = None,
    uncond_embeddings=None,
    start_time=50,
    return_type='image'
):
    batch_size = len(prompt)
    register_attention_control(model, controller)
    height = width = 512

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