openai / glide-text2im

GLIDE: a diffusion-based text-conditional image synthesis model
MIT License
3.54k stars 500 forks source link

Better resolution images for inpainting #33

Closed lcipolina closed 2 years ago

lcipolina commented 2 years ago

Hello, thank you for this model!

I have been wondering how to get better resolution on the outputs for inpainting. I believe that the main issue is the downsizing of the input image to 64X64, which loses a lot of resolution. Then, the upsampling can only be done up to 256x256 (more will create artifacts).

I have tried to replace the 64X64 to something like 128X128 (which then will make it easier to upsample to 512X512) but got the below error.

Is there a way to improve the output resolution of the inpainting model? In particular, to test my hypothesis that the low resolution is due to the downsampling - fill in - upsampling low resolutions?

This is the error I am getting when replacing 64X64 -> 128x128 on the Colab:

error

Thanks!

woctezuma commented 2 years ago

See;

We haven't trained an upsampler for higher resolutions. You can't just change the code and load the old upsampler model--it won't work because it was trained for 256x256. People on Twitter have been using third-party upsamplers / image super resolution models.

lcipolina commented 2 years ago

Thank you. I saw indeed your reply before. I thought you were talking about upsamplers.

What I want to confirm is: there is no way to avoid downsizing to 64X64? (and use say 128x128) upsampling from there is easy.. the problem is the downsampling to such a small resolution.

woctezuma commented 2 years ago

I thought you were talking about upsamplers.

True.

What I want to confirm is: there is no way to avoid downsizing to 64X64?

I don't think there is a trick get higher resolution outputs without upsampling.

Paper

As I understand it, the model was trained at 64x64 resolution, so the only ways to get higher resolution outputs would be:

lcipolina commented 2 years ago

I don't think t

Thank you so much for your prompt and detailed reply.

I will close the issue now.

Thanks!