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

FileNotFoundError #37

Open
MRX82 opened this issue May 7, 2024 · 9 comments
Open

FileNotFoundError #37

MRX82 opened this issue May 7, 2024 · 9 comments

Comments

@MRX82
Copy link

MRX82 commented May 7, 2024

FileNotFoundError

Screenshot 2024-05-07 083829

@fartist123
Copy link

I'm having the same problem, here is what paperspace suggested:

To install Python 3.9 on your machine please follow the next steps:

$ sudo apt update

$ sudo apt install software-properties-common

$ sudo add-apt-repository ppa:deadsnakes/ppa

$ sudo apt install python3.9

Note: When prompted, press [Enter] or [Y] to continue.

Verify that the installation was successful by typing:

$ python3.9 --version

Finally, verify that the directory dist-packages exist running:

$ ls /usr/local/lib/python3.9/

@MRX82
Copy link
Author

MRX82 commented May 8, 2024

Thank you! That did fix the first issue.
Now I keep getting: ModuleNotFoundError: No module named 'pytorch_lightning'

0001

111

Traceback (most recent call last):
File "/notebooks/sd/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/notebooks/sd/stable-diffusion-webui/modules/initialize.py", line 17, in imports
import pytorch_lightning # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'pytorch_lightning'

@TheLastBen
Copy link
Owner

you need to use to choose pytorch 1.12 as the base for your machine

@fartist123
Copy link

Even when I start a fresh pytorch 1.12 project, I get the same error he's getting. If I manually install enough of the dependencies, I eventually get this:

Traceback (most recent call last):
File "/notebooks/sd/stable-diffusion-webui/webui.py", line 13, in
initialize.imports()
File "/notebooks/sd/stable-diffusion-webui/modules/initialize.py", line 15, in imports
import torch # noqa: F401
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/torch/init.py", line 237, in
from torch._C import * # noqa: F403
^^^^^^^^^^^^^^^^^^^^^^
ImportError: /usr/local/lib/python3.11/dist-packages/torch/lib/../../nvidia/cusparse/lib/libcusparse.so.12: undefined symbol: __nvJitLinkAddData_12_1, version libnvJitLink.so.12

@MRX82
Copy link
Author

MRX82 commented May 9, 2024

when I try to install pytorch 1.12.1 I get this:

pip install torch==1.12.1
ERROR: Could not find a version that satisfies the requirement torch==1.12.1 (from versions: 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0)
ERROR: No matching distribution found for torch==1.12.1

@TheLastBen
Copy link
Owner

you don't need to install pytorch 1.12, simply use the pytorch 1.12 template in paperspace

@fartist123
Copy link

fartist123 commented May 9, 2024

Run each command step-by-step, I was able to get stable diffusion to boot, but it only generates a local address.

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
sudo apt install python3.10
sudo apt install python3.11
sudo apt install python3.12

Run the Dependencies Cell
Run Install/Update Automatic repo Cell
Run Model Cell
Run LoRA Cell
Run ControlNet Cell

python -m pip install pytorch-lightning
pip3 install accelerate==0.20.3
pip3 install -r /notebooks/sd/stable-diffusion-webui/requirements_versions.txt
!pip install git+https://github.com/openai/CLIP.git
!pip install tensorflow[and-cuda]
pip install tensorrt
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.11/dist-packages/tensorrt_libs/
pip3 install torch==2.0.1
pip install --force-reinstall --no-deps --pre xformers==0.0.20
set COMMANDLINE_ARGS= --xformers --opt-sdp-no-mem-attention --listen --enable-insecure-extension-access
pip install torchvision==0.15.2
pip install torchaudio==2.0.2

These I'm not sure about:
pip install tokenizer
pip install -U paperspace
pip install -U notebook

@fartist123
Copy link

I figured it out!!! Do all the steps from my previous post, and then add "--share" after webui.py

figured

Your welcome, please upvote me to the moon if you could

@MRX82
Copy link
Author

MRX82 commented May 10, 2024

Awsome! Thank You! I will!!!

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

3 participants