TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.56k stars 1.31k forks source link

FileNotFoundError [Paperspace] #2825

Open kocten7 opened 7 months ago

kocten7 commented 7 months ago

Hello, I got this error today. Please help me to fix it. Thanks in advance!

PS

fartist123 commented 6 months ago

After updating my paperspace gradient version, I've been having the same error.

This problem has not been solved, and I'm shocked more people arent talking about it.

TheLastBen commented 6 months ago

@fartist123 try running the notebook inside the folder "latest_notebooks"

fartist123 commented 6 months ago

I did, still has the same issue

fartist123 commented 6 months ago

I get this error if I update torch torchaudio torchvision xformers

error2

fartist123 commented 6 months ago

Paperspace support sent me that, still wont work

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/

kocten7 commented 6 months ago

Unfortunately, the problem is still relevant. Please help me to fix it.


FileNotFoundError Traceback (most recent call last) Cell In[1], line 8 3 force_reinstall= False 5 # Set to true only if you want to install the dependencies again. 6 7 #-------------------- ----> 8 with open('/dev/null', 'w') as devnull:import requests, os, time, importlib;open('/notebooks/mainpaperspaceA1111.py', 'wb').write(requests.get('https://huggingface.co/datasets/TheLastBen/PPS/raw/main/Scripts/mainpaperspaceA1111.py').content);os.chdir('/notebooks');time.sleep(3);import mainpaperspaceA1111;importlib.reload(mainpaperspaceA1111);from mainpaperspaceA1111 import *;Deps(force_reinstall)

File /notebooks/mainpaperspaceA1111.py:31, in Deps(force_reinstall) 29 call("pip install --root-user-action=ignore --no-deps -q accelerate==0.12.0", shell=True, stdout=open('/dev/null', 'w')) 30 if not os.path.exists('/usr/local/lib/python3.9/dist-packages/safetensors'): ---> 31 os.chdir('/usr/local/lib/python3.9/dist-packages') 32 call("rm -r torch torch-1.12.1+cu116.dist-info torchaudio torchvision PIL Pillow transformers numpy gdown", shell=True, stdout=open('/dev/null', 'w')) 33 ntbk()

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.9/dist-packages'

TheLastBen commented 6 months ago

don't update torch and xformers

fartist123 commented 6 months ago

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 commented 6 months ago

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

kocten7 commented 6 months ago

Do all the steps from my previous post, and then add "--share" after webui.py

Excuse me, where do these commands run?

fartist123 commented 6 months ago

term1 term2 term3

kocten7 commented 6 months ago

@fartist123 Thank you very much, I will try to do that. I haven't been able to start SD on Paperspace for a week now.

kvlchuk commented 6 months ago

@fartist123 done) it is workit

kvlchuk commented 6 months ago

@fartist123 only every time you start, you have to enter everything into the terminal again.

TheLastBen commented 6 months ago

No need to do anything, start a new machine with the latest notebooks and everything will work out of the box

kocten7 commented 6 months ago

I confirm, it's already working as it should!