hollowstrawberry/kohya-colab

Broken xformers (and instructions to fix)

Closed this issue · 3 comments

For those are having issues with xformers to work, and getting xformers 0.0.26.dev... not working because it can't find the version, since the devs removed a working one again.

Here is the steps to fix this:
Step one, go to this site: this is the history and shows the latest dev build available, in a post before me they said that the devs removed 767 and then their was a 769 version, I cant remember which exact version it is. But they removed the version mentioned in the post like the version before.....and now dev777 is the new one that just got released yesterday!!

I been looking where to find the latest dev version that's available but couldn't find it until today, and now this version works on my end.
So save this website! it's going to be useful, they tend to remove the dev version that worked with a newer one, which is why xformers always couldn't be found!
https://pypi.org/project/xformers/0.0.26.dev777/#history

Second, did you copy the lora trainer to your drive?

If yes, then I realized a trick (If you don't mind putting in your settings again), you can replace the entire code from the source notebook onto your copy and then you will be good, or just pull another copy to your drive! (Be sure to pin the save revision before editing your copy!)

if you want to just replace the code into your copy instead of making another copy to your drive, then follow the two steps below in order for you to see the code!, once you know how to pull it up, just click once anywhere on it, and then ctrl or cmd +A and it should highlight all of it in the code area. and just copy it and then repeat highlighting the code on your drive copy and then paste!

ok, then now you have one more thing to do, that you will need to remember in case the xformers devs remove a version and replace it again.
(How to find the code to copy and replace)
double click any blank space inside the training cell: (excuse the strange circles)
image

as long as you double click within the cell, then this should show up:

image

(fix the xformers version)

now, you scroll down untill you see this:
image

Take note of the blank area on the right, you should be down enough to not see any on the right side, now you should see xformers on there.

notice the dev767??, yeah so all you need to do is just change the numbers and leave dev there!
Remember that website I told you to save?

image

it's .dev777 now (it just came out yesterday!), replace the 767(or if you had a different version after 767) with 777, the code screenshots are from the main uncopied version of (XL Lora Trainer by Hollowstrawberry), this is what the code looks like and I have not edited it yet!

now that you edited the dev number.
Save!

I tested this and got xformers to work!
also embarrassingly enough I discovered this trick when I realized that having a saved copy doesn't get any code updates automatically! so I had a broken notebook for months until yesterday! xD

You're saying xformers is broken again? If so I'll try to fix it for everyone

You're saying xformers is broken again? If so I'll try to fix it for everyone

yepp xD
I had just fixed it on the 29th, and then I tied to run again yesterday and stopped working, and found out they replaced the version.
So thought to bring up this fix in case they do it again.

I'll just keep updating the xformers as the dev versions come out. In any case, I recommend using sdpa instead.