eric-ai-lab / photoswap

Official implementation of the NeurIPS 2023 paper "Photoswap: Personalized Subject Swapping in Images"
https://photoswap.github.io
MIT License
342 stars 24 forks source link

Trouble with Setting Custom Image Resolution #9

Open SlZeroth opened 1 year ago

SlZeroth commented 1 year ago

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
g-jing commented 11 months ago

Sorry but we do not support that in this project as it is limited by the stable diffusion backbone. Our ongoing work will be able to support that, and that will be released soon. Please stay tuned!