• Andrew Ryan's avatar
    Add latent upscale option to img2img · 358a8628
    Andrew Ryan authored
    Recently, the option to do latent upscale was added to txt2img highres
    fix. This feature runs by scaling the latent sample of the image, and
    then running a second pass of img2img.
    
    But, in this edition of highres fix, the image and parameters cannot be
    changed between the first pass and second pass. We might want to do a
    fixup in img2img before doing the second pass, or might want to run the
    second pass at a different resolution.
    
    This change adds the option for img2img to perform its upscale in latent
    space, rather than image space, giving very similar results to highres
    fix with latent upscale.  The result is not exactly the same because
    there is an additional latent -> decoder -> image -> encoder -> latent
    that won't happen in highres fix, but this conversion has relatively
    small losses
    358a8628
processing.py 40.9 KB