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

Zip Dependencies with Long Paths #788

Merged
merged 2 commits into from
May 17, 2024
Merged

Zip Dependencies with Long Paths #788

merged 2 commits into from
May 17, 2024

Conversation

NullSenseStudio
Copy link
Collaborator

Currently Windows users struggle to install packaged releases due to errors caused by long paths, even when long paths are enabled for their system. Once installed a certain file has an entire path length of 259 characters when not including the Windows username. This became more of a noticeable issue in the last release due to a path in the transformers module growing by 11 characters.

To help prevent this issue, this PR zips the transformers module separately and enables it to be loaded like normal. Now the max path length is 225, so installing shouldn't be an issue as long as the username isn't more than 34 characters or another module grows in path length. This method is a little limiting as it only supports zipping modules that use .py files, no .dll or other special files. The new longest path belongs to torch, which is not compatible to shorten the path length further.

@NullSenseStudio
Copy link
Collaborator Author

NullSenseStudio commented Apr 21, 2024

The described issue encountered while installing:

FileNotFoundError: [Errno 2] No such file or directory: '...\\dream_textures\\.python_dependencies\\transformers\\models\\deprecated\\trajectory_transformer\\__pycache__\\convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.cpython-310.pyc'

This error message is only noticeable with the system console window open. In my experience it just minimizes the preferences window so there is no proper feedback that this error occurred and the user continues on thinking it's just complete. Next when trying to enable the addon a new error will appear in the preferences UI:

ModuleNotFoundError: No module named 'dream_textures.api'

And in older versions it could appear as:

ModuleNotFoundError: No module named 'dream_textures.prompt_engineering'

This will at least fix the error while installing, though I am uncertain if there are other causes for the error when enabling the addon.

Copy link
Owner

@carson-katri carson-katri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@carson-katri carson-katri merged commit fe9a9dc into main May 17, 2024
2 checks passed
@carson-katri carson-katri deleted the zip-dependencies branch May 17, 2024 17:35
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

Successfully merging this pull request may close these issues.

None yet

2 participants