Open pbl2017 opened 5 months ago
fwiw, i'm seeing this same error as well. mac 14.4.1, latest automatic.
Came here to report the same issue ever since 1.8. Why is this happening and why does it seem like nobody is acknowledging it?
The issues persists in 1.9.3...
Issue still persists, was greeted by it's error messages after updating from 1.7 to 1.9.3
Here is a real workaround/Fix for those who have the bug and still want to publish embeddings to the public without the error embedded: User "Perfection" from CivitAI gets the credit for telling me how to fix this
I try to make this understandable for dummies, I am a dummie and I usually don't understand what people say here :-D
Your Issue is: You can't create a new embedding due to the error message
Why? Because the software writes code into your PT File that should not be there.. stay tuned we will fix this
I recommend 2 installations of Automatic1111 one basic one without extensions for creating embeddings and your regular one with all bells and whistles that make you happy It helps you store the corrupt embeddings in one place and move the fixed ones over to your actual A1111 installation for generating content. 2 Installations aren't necessary but it helps to explain what we are doing here.
Now what you want to do is add this code into the webui-user.bat (the one you use for creating embeddings) set COMMANDLINE_ARGS=--xformers --disable-safe-unpickle (This is not a fix, this just ignores the error and let's you train the model, it trains the model as a corrupted file)
Train your embedding and after the training you follow these steps exactly: rename your Embedding "Yourname.pt" to "Yourname.zip" (for the real dummies, you don't have to name it "yourname")
Now open the zipfile (don't unpack it) locate the folder ".data" (not Data) and the file "Byteorder" delete both of them
Rename your Embedding back to "Yourname.pt" Now the file is 100% clean and it runs on every system again.
This will work, it doesn't stop the error from reproducing, but those who publish embeddings can now post their work again without having to explain why their files are corrupted.
This also means, all that Automatic1111 needs to do is to disallow the .data folder and the bytorder to be written into the file or create a script that deletes those files from a finished embedding.
I try to fix this ,if you are in a hurry ,try edit modules/textual_inversion/textual_inversion.py
line 64 and line 71 just like this
After do this ,restart webui and recreat embedding
This could cause some performance issues but train and infer should be all correct now
This could cause some performance issues
Why is that?
This could cause some performance issues
Why is that?
This prevents pytorch from using new compression and serialization methods (after pytorch version 1.6), which do not change the model structure but may require writing more data during the loading and saving stages (please refer to the relevant update logs of pytorch for specific details, i never tested)
Sorry, my English is not good, so I am using translation software for conversation.
That sounds like a very small impact to performance if indeed that's all that is affected, I reckon hardly noticeable during training. Thank you for the explanation.
Checklist
What happened?
Creation of new embedding failed.
Steps to reproduce the problem
What should have happened?
embedding file should have been successfully created
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
sysinfo-2024-04-13-18-26.json
Console logs
Additional information
Bug introduced in 1.8.0, reported twice by others; reports possibly incomplete and moved to /dev/null ?