txt2img Hires Fix
This commit is contained in:
parent
6c6c6636bb
commit
c27c0de0f7
@ -268,6 +268,7 @@ class Processed:
|
|||||||
self.height = p.height
|
self.height = p.height
|
||||||
self.sampler_name = p.sampler_name
|
self.sampler_name = p.sampler_name
|
||||||
self.cfg_scale = p.cfg_scale
|
self.cfg_scale = p.cfg_scale
|
||||||
|
self.image_cfg_scale = getattr(p, 'image_cfg_scale', None)
|
||||||
self.steps = p.steps
|
self.steps = p.steps
|
||||||
self.batch_size = p.batch_size
|
self.batch_size = p.batch_size
|
||||||
self.restore_faces = p.restore_faces
|
self.restore_faces = p.restore_faces
|
||||||
|
@ -352,7 +352,7 @@ class KDiffusionSampler:
|
|||||||
'cond_scale': p.cfg_scale,
|
'cond_scale': p.cfg_scale,
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.image_cfg_scale:
|
if hasattr(p, 'image_cfg_scale'):
|
||||||
extra_args['image_cfg_scale'] = p.image_cfg_scale
|
extra_args['image_cfg_scale'] = p.image_cfg_scale
|
||||||
|
|
||||||
samples = self.launch_sampling(t_enc + 1, lambda: self.func(self.model_wrap_cfg, xi, extra_args=extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
|
samples = self.launch_sampling(t_enc + 1, lambda: self.func(self.model_wrap_cfg, xi, extra_args=extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
|
||||||
|
Loading…
Reference in New Issue
Block a user