Commit c27c0de0 authored by Kyle's avatar Kyle

txt2img Hires Fix

parent 6c6c6636
......@@ -268,6 +268,7 @@ class Processed:
self.height = p.height
self.sampler_name = p.sampler_name
self.cfg_scale = p.cfg_scale
self.image_cfg_scale = getattr(p, 'image_cfg_scale', None)
self.steps = p.steps
self.batch_size = p.batch_size
self.restore_faces = p.restore_faces
......
......@@ -352,7 +352,7 @@ class KDiffusionSampler:
'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
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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment