tamarott / SinGAN

Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"
https://tamarott.github.io/SinGAN.htm
Other
3.31k stars 612 forks source link

Problem about generating random samples of arbitrary size #61

Open yikedi opened 4 years ago

yikedi commented 4 years ago

I can only generate random samples of arbitrary size with gen_start_scale=0. I would get runtime error if I use gen_start_scale bigger than 0.

image

tamarott commented 4 years ago

Thanks, this function indeed can only work with gen_start_scale=0. This because when starting the generation from a finer scale, you need to also input a specific image to this scale. In the case of using the random_samples mode, this input will be the reconstructed image from the previous scale, which has the dimension of the training image of that scale. In the case of random_samples_arbitrary_sizes mode, we couldn't use it as an input, as it doesn't match the desire image dimensions.