mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
offload disabled controlnets
This commit is contained in:
@@ -75,6 +75,7 @@ To use and of the new models, simply select model from *Networks -> Reference* a
|
||||
*note*: requires reset of selected offload option
|
||||
- control module allows reszing of indivudual process override images to match input image
|
||||
for example: set size->before->method:nearest, mode:fixed or mode:fill
|
||||
- automatically offload disabled controlnet units
|
||||
- update **IPEX** to 2.1.40+xpu on Linux, thanks @Disty0!
|
||||
- general **ROCm** fixes, thanks @lshqqytiger!
|
||||
- fix full vae previews, thanks @Disty0!
|
||||
|
||||
@@ -213,7 +213,14 @@ 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}"')
|
||||
sd_models.move_model(u.controlnet.model, devices.cpu)
|
||||
continue
|
||||
else:
|
||||
if u.controlnet is not None and u.controlnet.model is not None:
|
||||
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)
|
||||
active_model.append(u.adapter)
|
||||
|
||||
Reference in New Issue
Block a user