Fantastic Model + Cool Demo

#1
by Tonic - opened

279ce505-7b21-4152-a5d8-e7627cacc444.png

image (45).webp
image (44).webp

nice example ! love it !

@fffiloni

Great app. I need a help.

The generated image is low resolution. That is, if I give 2048 x 2048 image, I want to get the generated image as (2048x2048) + generated resolution.

I went through the code, but since I am new to python and AI, I didn't get it. Could you help?

@RageshAntony yes this is expected, as your input is resized to fit in a max 1024 generation. This is arbitrary for demo purpose.

You can duplicate the space and study the code to easily understand how you could change it to fit your needs.

Or you can use an enhancer after your inference, you can try the finegrain’s one, i got good results 👍

@fffiloni
Thanks. In the app.py, where does the "generated extra image" returned? Is the image variable in yield cnet_image, image ?

    for image in pipe(
        prompt_embeds=prompt_embeds,
        negative_prompt_embeds=negative_prompt_embeds,
        pooled_prompt_embeds=pooled_prompt_embeds,
        negative_pooled_prompt_embeds=negative_pooled_prompt_embeds,
        image=cnet_image,
    ):
        yield cnet_image, image

    image = image.convert("RGBA")
    cnet_image.paste(image, (0, 0), mask)

    yield background, cnet_image

Sign up or log in to comment