fix --hires to support inpainting model

This commit is contained in:
Lincoln Stein 2022-10-27 23:12:21 -04:00
parent 387f796ebe
commit 05b8de5300

View File

@ -25,16 +25,15 @@ class Txt2Img2Img(Generator):
kwargs are 'width' and 'height'
"""
uc, c, extra_conditioning_info = conditioning
scale_dim = min(width, height)
scale = 512 / scale_dim
init_width = math.ceil(scale * width / 64) * 64
init_height = math.ceil(scale * height / 64) * 64
@torch.no_grad()
def make_image(x_T):
scale_dim = min(width, height)
scale = 512 / scale_dim
init_width = math.ceil(scale * width / 64) * 64
init_height = math.ceil(scale * height / 64) * 64
shape = [
self.latent_channels,
init_height // self.downsampling_factor,