fix xyz grid with scripts/detailer

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2024-11-17 07:58:21 -05:00
parent 59cd08f5da
commit bbd224c9f0
2 changed files with 11 additions and 4 deletions
-1
View File
@@ -202,7 +202,6 @@ class YoloRestorer(Detailer):
shared.log.info(f'Detailer: model="{name}" no items detected')
continue
pp = None
shared.opts.data['mask_apply_overlay'] = True
resolution = 512 if shared.sd_model_type in ['none', 'sd', 'lcm', 'unknown'] else 1024
orig_prompt: str = orig_p.get('all_prompts', [''])[0]
+11 -3
View File
@@ -419,6 +419,14 @@ class Script(scripts.Script):
def process_images(self, p, *args): # pylint: disable=W0221, W0613
if p.iteration > 0 and cache is not None and len(cache.images) > 0:
cache.images = [] # avoid returning same images multiple items
return cache
if hasattr(cache, 'used'):
cache.images.clear()
cache.used = False
elif cache is not None and len(cache.images) > 0:
cache.used = True
p.restore_faces = False
p.detailer = False
p.color_corrections = None
p.scripts = None
return cache
return None