Skip to content
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

TI errors. #76

Closed
DarkAlchy opened this issue Jan 27, 2023 · 2 comments
Closed

TI errors. #76

DarkAlchy opened this issue Jan 27, 2023 · 2 comments

Comments

@DarkAlchy
Copy link

DarkAlchy commented Jan 27, 2023

Traceback (most recent call last):
File "D:\kohya_ss\train_textual_inversion.py", line 498, in
train(args)
File "D:\kohya_ss\train_textual_inversion.py", line 260, in train
train_util.patch_accelerator_for_fp16_training(accelerator)
File "D:\kohya_ss\library\train_util.py", line 1345, in patch_accelerator_for_fp16_training
org_unscale_grads = accelerator.scaler.unscale_grads
AttributeError: 'NoneType' object has no attribute 'unscale_grads'

I am getting a few errors when trying to do a TI training and this is just one of them. Another is about - File "D:\kohya_ss\train_textual_inversion.py", line 356, in train
unwrap_model(text_encoder).get_input_embeddings().weight[index_no_updates] = orig_embeds_params[index_no_updates]
RuntimeError: Index put requires the source and destination dtypes match, got Half for the destination and Float for the source.

File "D:\kohya_ss\train_textual_inversion.py", line 498, in
train(args)
File "D:\kohya_ss\train_textual_inversion.py", line 260, in train
train_util.patch_accelerator_for_fp16_training(accelerator)
File "D:\kohya_ss\library\train_util.py", line 1345, in patch_accelerator_for_fp16_training
org_unscale_grads = accelerator.scaler.unscale_grads
AttributeError: 'NoneType' object has no attribute 'unscale_grads'

@bmaltais
Copy link
Owner

It is quite possible this is a but with the new TI trainer code of kohya. Take note of the command used by the GUI and the error and open an issue on kohya's repo. I don't think this one is related to the GUI:

https://github.com/kohya-ss/sd-scripts/issues

@DarkAlchy
Copy link
Author

Hard to know which person does what as I am not used to projects having things separated like this one.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants