mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
update
This commit is contained in:
@@ -213,13 +213,13 @@ def control_run(units: List[unit.Unit] = [], inputs: List[Image.Image] = [], ini
|
||||
num_units += 1
|
||||
debug(f'Control unit: i={num_units} type={u.type} enabled={u.enabled}')
|
||||
if not u.enabled:
|
||||
shared.log.debug(f'Control unit disabled: i={num_units}')
|
||||
if u.controlnet is not None and u.controlnet.model is not None:
|
||||
shared.log.debug(f'Control unit offload: model="{u.controlnet.model_id}"')
|
||||
debug(f'Control unit offload: model="{u.controlnet.model_id}" device={devices.cpu}')
|
||||
sd_models.move_model(u.controlnet.model, devices.cpu)
|
||||
continue
|
||||
else:
|
||||
if u.controlnet is not None and u.controlnet.model is not None:
|
||||
debug(f'Control unit offload: model="{u.controlnet.model_id}" device={devices.device}')
|
||||
sd_models.move_model(u.controlnet.model, devices.device)
|
||||
if unit_type == 't2i adapter' and u.adapter.model is not None:
|
||||
active_process.append(u.process)
|
||||
|
||||
@@ -300,6 +300,9 @@ def resize_image(resize_mode, im, width, height, upscaler_name=None, output_type
|
||||
from modules import masking
|
||||
res = fill(im, color=0)
|
||||
res, _mask = masking.outpaint(res)
|
||||
else:
|
||||
res = None
|
||||
raise ValueError(f'Invalid resize mode: {resize_mode}')
|
||||
if output_type == 'np':
|
||||
return np.array(res)
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user