fix debug map when attaching two LoRAs

(in that case return the path of the LoraAdapter)
This commit is contained in:
Pierre Chapuis 2024-03-05 17:27:41 +01:00
parent 72fa17df48
commit ccd9414ff1

View file

@ -460,6 +460,9 @@ def _auto_attach_loras(
adapter, parent = attached adapter, parent = attached
if parent is None: if parent is None:
# `adapter` is already attached and `lora` has been added to it # `adapter` is already attached and `lora` has been added to it
if debug_map is not None:
path = adapter.get_path()
debug_map.append((key, path))
continue continue
if debug_map is not None: if debug_map is not None:
path = adapter.target.get_path(parent) path = adapter.target.get_path(parent)