mirror of
https://github.com/ostris/ai-toolkit.git
synced 2026-04-30 11:11:37 +00:00
Upgraded to dev for t2i on diffusers. Minor migrations to make it work.
This commit is contained in:
@@ -122,11 +122,14 @@ class ToolkitModuleMixin:
|
||||
|
||||
return lx * scale
|
||||
|
||||
def forward(self: Module, x):
|
||||
# this may get an additional positional arg or not
|
||||
|
||||
def forward(self: Module, x, *args, **kwargs):
|
||||
# diffusers added scale to resnet.. not sure what it does
|
||||
if self._multiplier is None:
|
||||
self.set_multiplier(0.0)
|
||||
|
||||
org_forwarded = self.org_forward(x)
|
||||
org_forwarded = self.org_forward(x, *args, **kwargs)
|
||||
lora_output = self._call_forward(x)
|
||||
multiplier = self._multiplier.clone().detach()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user