openai / guided-diffusion

MIT License
6.03k stars 803 forks source link

How are the channel_mult for different resolutions determined #74

Closed SvenGroen closed 1 year ago

SvenGroen commented 1 year ago

Hi, in script_util.py when you create the model/classifier (line 148, 238 & 353) you support the image sizes of 512, 256, 128 and 64 by specifying the channel_mult.

How have you determined the channel_mult numbers for the different image sizes? have you figured them out by experimenting, or is there some underlying logic?

If I would like to try out a resolution of 32x32 or 16x16, how would I have to define the channel_mult?

Cheers, Sven

xcharxlie commented 1 year ago

@SvenGroen HI there, I also met the same issue. Do you know how to determine that?

SvenGroen commented 1 year ago

@SvenGroen HI there, I also met the same issue. Do you know how to determine that?

Hi @xcharxlie, I ended up not continuing with this code/with the project, but I had a look at my old code: For 32x32 i used: channel_mult = (1, 2, 2, 2)

If I remember correctly, I used a trial and error approach 😄 I also have a faint memory, that trying to get 16x16 to work really gave me a lot of headache. I think it had something to do with the downscaling block in the middle, that tried to downscale something that was basically too small already....but I am not really sure any more. Maybe give it a try and you can figure it out, Good luck!

Hope this helps somehow 😃