OneTrainer icon indicating copy to clipboard operation
OneTrainer copied to clipboard

[Bug]: Compile transformer blocks when on Windows

Open hyppyhyppo opened this issue 1 month ago • 2 comments

What happened?

When activating the option "Compile transformer block" the cache under user/username/appdata/local/temp/torchinductor etc wasn't updated properly due to long file path exceeding the Window limit (260 characters) And then cause errors because files where not not found, just missing.

A fix has been found by enabling LongPathName in Regedit. Edit its value to 1 as a decimal. Image

Full details here with logs and its resolution (check following messages) https://discord.com/channels/1102003518203756564/1102012968511742099/1438076157265182813

What did you expect would happen?

Not having Windows users to trick the system to use that feature. But the regedit trick do the work.

Relevant log output


Generate and upload debug_report.log

No response

hyppyhyppo avatar Nov 12 '25 12:11 hyppyhyppo

https://github.com/pytorch/pytorch/issues/167891

dxqb avatar Nov 15 '25 00:11 dxqb

I don't know of a clean workaround. We could shorten the base path so the total path is maybe 240 characters, but it could happen again then with longer kernel names. Unless many users are affected the best workaround is enabling long paths and waiting for pytorch to address it

dxqb avatar Nov 15 '25 00:11 dxqb