Added experimental concept replacer, replicate converter, bucket maker, and other goodies

This commit is contained in:
Jaret Burkett
2023-09-06 18:50:32 -06:00
parent f84500159c
commit 436bf0c6a3
8 changed files with 517 additions and 561 deletions

View File

@@ -52,7 +52,7 @@ class LoRAModule(ToolkitModuleMixin, torch.nn.Module):
self.lora_name = lora_name
self.scalar = torch.tensor(1.0)
if org_module.__class__.__name__ == "Conv2d":
if org_module.__class__.__name__ in CONV_MODULES:
in_dim = org_module.in_channels
out_dim = org_module.out_channels
else:
@@ -66,7 +66,7 @@ class LoRAModule(ToolkitModuleMixin, torch.nn.Module):
# else:
self.lora_dim = lora_dim
if org_module.__class__.__name__ == "Conv2d":
if org_module.__class__.__name__ in CONV_MODULES:
kernel_size = org_module.kernel_size
stride = org_module.stride
padding = org_module.padding