mirror of
https://github.com/vladmandic/automatic
synced 2026-08-27 07:31:01 +02:00
create_ui and process refactor
This commit is contained in:
@@ -23,7 +23,7 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
|
||||
results = []
|
||||
is_refiner_enabled = p.enable_hr and p.refiner_steps > 0 and p.refiner_start > 0 and p.refiner_start < 1 and shared.sd_refiner is not None
|
||||
|
||||
if hasattr(p, 'init_images') and len(p.init_images) > 0:
|
||||
if getattr(p, 'init_images', None) is not None and len(p.init_images) > 0:
|
||||
tgt_width, tgt_height = 8 * math.ceil(p.init_images[0].width / 8), 8 * math.ceil(p.init_images[0].height / 8)
|
||||
if p.init_images[0].width != tgt_width or p.init_images[0].height != tgt_height:
|
||||
shared.log.debug(f'Resizing init images: original={p.init_images[0].width}x{p.init_images[0].height} target={tgt_width}x{tgt_height}')
|
||||
@@ -358,7 +358,7 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
|
||||
if k in possible:
|
||||
args[k] = v
|
||||
|
||||
hypertile_set(p, hr=len(getattr(p, 'init_images', [])))
|
||||
hypertile_set(p, hr=len(getattr(p, 'init_images', [])) > 0)
|
||||
clean = args.copy()
|
||||
clean.pop('callback', None)
|
||||
clean.pop('callback_steps', None)
|
||||
|
||||
Reference in New Issue
Block a user