fix miscellaneous regressions:

- embiggen needs to use ddim sampler due to low step count
- --hires_fix option needs to be written to log and command string
- fix call signature of _init_image_mask()
This commit is contained in:
Lincoln Stein 2022-10-04 10:30:01 -04:00
parent 4c482fe24a
commit 18e667f98e
2 changed files with 4 additions and 1 deletions

View File

@ -193,6 +193,8 @@ class Args(object):
switches.append('--grid')
if a['seamless']:
switches.append('--seamless')
if a['hires_fix']:
switches.append('--hires_fix')
# img2img generations have parameters relevant only to them and have special handling
if a['init_img'] and len(a['init_img'])>0:

View File

@ -10,6 +10,7 @@ from PIL import Image
from ldm.dream.generator.base import Generator
from ldm.dream.generator.img2img import Img2Img
from ldm.dream.devices import choose_autocast
from ldm.models.diffusion.ddim import DDIMSampler
class Embiggen(Generator):
def __init__(self, model, precision):
@ -349,7 +350,7 @@ class Embiggen(Generator):
prompt,
iterations = 1,
seed = seed,
sampler = sampler,
sampler = DDIMSampler(self.model, device=self.model.device),
steps = steps,
cfg_scale = cfg_scale,
conditioning = conditioning,