Closed SmirkingKitsune closed 6 months ago
OK, I have been able to reproduce the issue and it appear to be a bug introduced in a newer version of lycoris_lora that is used in the GUI version v22.6.2
. THe latest GUI use the latest version of lycoris_lora and this is where this traceback is coming from. Perhaps @KohakuBlueleaf can do comething about it. I am not sure I can fis this with a GUI parameter... but maybe I can? I will do a quick code check for this parameter name and see if it can be passed to the network... but I doubt...
You may want to open an issue directly on @KohakuBlueleaf repo for Lycoris... https://github.com/KohakuBlueleaf/LyCORIS/issues
To work around the compatibility issue with the dylora
algorithm, which currently lacks support for scale weight normalization, you can adjust the module's initialization code as follows:
if algo == "dylora":
# Attempt to remove the unsupported feature from the `network` class
try:
delattr(type(network), "apply_max_norm_regularization")
except AttributeError:
# If the attribute doesn't exist, do nothing
pass
This adjustment ensures the code executes correctly by removing the unsupported apply_max_norm_regularization
feature when using the dylora
algorithm.
If you're currently using an older version of the GUI and encountering this issue, you have two options:
init
). However, please be aware that this is a temporary solution and may lead to complications when updating the Lycoris module in the future. Once an updated version of the module that resolves this issue is released, you'll need to revert the changes made to the initialization code to ensure smooth installation.Caution: Opting for the temporary fix to use the latest GUI features alongside the Lycoris code necessitates vigilance regarding future module updates. It's important to revert the manual adjustments to the initialization file before installing any updates to avoid potential installation issues.
Okay, I now understand that I made a mistake when I troubleshooted the lycoris_lora
module. Your workaround for lycoris_lora
seems to work.
I have also tested GUI v23.0.15
using the lycoris_lora 2.0.2
module, the lycoris_lora
module which GUI v22.6.2
uses, instead of lycoris_lora 2.2.0.post3
, this also seemed to work.
Therefore, it is clear that the issue is not with GUI v23.0.15
. I will open the issue with the LyCORIS repo. Closing the issue as 'closed'.
I am having trouble running the LyCORIS Dylora adaption algorithm on an
SD v1.5
checkpoint inGUI v23.0.15
. I am using this on a Windows 11 with RTX 3070. The environment usesTorch 2.1.2+cu118
,CUDA 11.8
,cuDNN 8905
,triton 2.1.0
, andPython 3.10.11
.When I try to use LyCORIS Dylora I get the following error:
I have tried reinstalling the venv but got the same result. For both attempts, I have used
bitsandbytes 0.43.0
orbitsandbytes-windows
.I have tried adding an if statement to the
lycoris_lora 2.2.0.post3
module to prevent it from callingdelattr(type(network), "apply_max_norm_regularization")
with the following if statement:if hasattr(type(network), "apply_max_norm_regularization"): delattr(type(network), "apply_max_norm_regularization")
However, I still got the same error.I have also tried running
SD-Scripts v0.8.4
onGUI v23.0.15
by disabling git and manually replacingSD-Scripts v0.8.5
with a copy ofSD-Scripts v0.8.4
, this resulted in the same error. I was previously usingSD-Scripts v0.8.4
onGUI v22.6.2
and that worked fine, so I don't think it is aSD-Scripts
problem.I did not experience this issue when using Kohya Dylora, only LyCORIS Dylora.