[Feature] Improve diffusion LoRA compatibility for SDXL (#4825)
Signed-off-by: Thanaji Rao Thakkalapelli <thanaji.rao.thakkalapelli@intel.com>
This commit is contained in:
1 parent
d526dc93e8
commit
1788d76eb3
2 files changed
+53
-1
No files matched your search
@@ -368,7 +368,17 @@ class DiffusionLoRAManager:
|
||||
|
||||
# Default denoising components plus any a pipeline opts into via
|
||||
# ``_lora_components`` (opt-in; other pipelines unchanged).
|
||||
default_components = ("transformer", "transformer_2", "dit", "bagel")
|
||||
#
|
||||
# NOTE: SDXL-style pipelines expose the denoiser as ``unet``.
|
||||
# Without scanning this component, adapters can load/activate while
|
||||
# effectively applying to zero layers, producing base-identical output.
|
||||
default_components = (
|
||||
"transformer",
|
||||
"transformer_2",
|
||||
"dit",
|
||||
"bagel",
|
||||
"unet",
|
||||
)
|
||||
extra_components = tuple(getattr(self.pipeline, "_lora_components", ()) or ())
|
||||
for component_name in (*default_components, *extra_components):
|
||||
if not hasattr(self.pipeline, component_name):
|
||||
|
||||
Reference in new issue
Block a user