-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: float() argument must be a string or a real number, not 'NoneType' #936
Comments
Yeah... There is a bug with Kohya sd-script... I thought I fixed it in the last release via a hack .. are you using the latest release? I was able to run the training on my end with it. Let me know how the last release work. |
Yeah I'm on commit 9125fb0 which should be the latest and running into this error. I saw the description mentioned fixing something for LoHA on the latest kohya code, but this was while attempting a lycoris LoCon, so not sure if the fix also applies to that. EDIT: |
@DocShotgun Yeah... I am building support in the GUI for all the other LyCORIS type (iA3, LoKr, DyLORA). It will include v0.1.6 of lycoris. So hoping this will fix all the LoHA training issues for everyone. You can use the dev2 branch code to test it before the release with:
then re-run setup.bat. |
Appears to work properly with the updated version of lycoris! |
use **kwargs and change svd() calling convention to make svd() reusable
So I've just updated to the latest version (9125fb0). Rebuilt the venv and all because it was throwing some tensorflow missing io error or something.
However now on attempting to train a lycoris LoCon, I'm getting the following error:
Traceback (most recent call last) ────────────────────────────────╮
│ C:\Users\mmmmm\Documents\kohya_ss\train_network.py:864 in
│
│ 861 │ args = parser.parse_args()
│ 862 │ args = train_util.read_config_from_file(args, parser)
│ 863 │
│ ❱ 864 │ train(args)
│ 865
│
│ C:\Users\mmmmm\Documents\kohya_ss\train_network.py:214 in train
│
│ 211 │ │ network, _ = network_module.create_network_from_weights(1, args.network_weights,
│ 212 │ else:
│ 213 │ │ # LyCORIS will work with this...
│ ❱ 214 │ │ network = network_module.create_network(
│ 215 │ │ │ 1.0, args.network_dim, args.network_alpha, vae, text_encoder, unet, dropout=
│ 216 │ │ )
│ 217 │ if network is None:
│
│ C:\Users\mmmmm\Documents\kohya_ss\venv\lib\site-packages\lycoris\kohya.py:26 in create_network
│
│ 23 │ │ network_dim = 4 # default
│ 24 │ conv_dim = int(kwargs.get('conv_dim', network_dim))
│ 25 │ conv_alpha = float(kwargs.get('conv_alpha', network_alpha))
│ ❱ 26 │ dropout = float(kwargs.get('dropout', 0.))
│ 27 │ algo = kwargs.get('algo', 'lora').lower()
│ 28 │ use_cp = (not kwargs.get('disable_conv_cp', True)
│ 29 │ │ │ or kwargs.get('use_conv_cp', False))
╰──────────────────────────────────────────────────────────────────────────────────
TypeError: float() argument must be a string or a real number, not 'NoneType'
I'm not really an experienced coder myself, but I think that nothing at all is being passed as the argument for dropout instead of the default value of 0.
I then tried to troubleshoot by manually specifying "dropout=0.0" under --network_args (executed training through a powershell script instead of through the UI), however that resulted in a different error saying that it got 2 different values for dropout.
The text was updated successfully, but these errors were encountered: