TheLastBen / fast-stable-diffusion

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

(Fix Guide) Paperspace Python3.9 is missing #2834

Closed fartist123 closed 6 months ago

fartist123 commented 6 months ago

This is a simple guide to repair the following paperspace error:

error

I still dont understand why the issue only started recently, but here is how to solve it:

First, open a new terminal on the paperspace console:

term1 term2 term3

Then paste the following into the Termal prompt (all the text in one prompt):

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

Now run the following Code-cells in this order:

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

Then paste the following into the Termal prompt (all the text in one prompt):

python -m pip install pytorch-lightning pip install torchvision==0.15.2 torchaudio==2.0.2 tensorrt !pip install tensorflow[and-cuda] git+https://github.com/openai/CLIP.git export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/python3.11/dist-packages/tensorrt_libs/ pip3 install accelerate==0.20.3 pip3 install -r /notebooks/sd/stable-diffusion-webui/requirements_versions.txt pip install onnx numexpr polygraphy onnxruntime onnx_graphsurgeon optimum pip install --force-reinstall --no-deps --pre xformers==0.0.20 set COMMANDLINE_ARGS= --allow-code --xformers --skip-torch-cuda-test --no-half-vae --api --listen --enable-insecure-extension-access --share

Then add the following commands to your "Start Stable-Diffusion" code-cell:

--allow-code --xformers --skip-torch-cuda-test --no-half-vae --api --listen --enable-insecure-extension-access --share

add add2 add3

Then Run the "Start Stable-Diffusion" code-cell and it should boot.

Your welcome.

Checkout my youtube channel if you feel interested: https://www.youtube.com/channel/UCHTWpAApt4alEyO-jLVlXMg

kocten7 commented 6 months ago

Unfortunately, it didn't work out for me.

PS

It would be great if the author fast-stable-diffusion or Paperspace would fix this. I'm not good at coding.

fartist123 commented 6 months ago

pip3 install -r /notebooks/sd/stable-diffusion-webui/requirements_versions.txt

that command includes the installation of gradio, try pasting all the lines into the prompt rather then just one at a time.

And I'm not good at coding either, I literally learnt linux 3 days ago if you can believe it.

kocten7 commented 6 months ago

Thanks for the support!

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

I'm having trouble at this step: term

I've tried pasting all the lines at once and one at a time too.

kocten7 commented 6 months ago

I got it! It's incredible! I pasted that line into the terminal and everything seemed to work: pip3 install -r /notebooks/sd/stable-diffusion-webui/requirements_versions.txt

Thank you so much for your help!

fartist123 commented 6 months ago

Run the Dependencies Cell

run1

Run Install/Update Automatic repo Cell

run2

Run Model Cell

run3

Run LoRA Cell

run4

Run ControlNet Cell

run5

Check out my youtube channel, you owe me. https://www.youtube.com/channel/UCHTWpAApt4alEyO-jLVlXMg

kocten7 commented 6 months ago

I subscribed to your YT channel and will be watching some videos soon. 🤝

TheLastBen commented 6 months ago

this issue happens only if you choose a different starting template, most users don't face this issue because they start with the paperspace pytorch 1.12 template

fartist123 commented 6 months ago

I've literally tried all the templates, including starting from scratch, and they all load with Python3.9 missing.

My issues started after a "update" button appeared next to this:

versiontype

Ever since I pressed the update, no matter what template I choose, this problem persists.

The reason I made this guide in the first place is I'm fully aware that if I'm having this problem, then many other people are having the exact problem as well, statistically. As they say, "there is nothing new under the sun".

I tried all the obvious fixes, nothing worked. Please assume I tried pytorch 1.12 template. The lack of support I've had with this problem drove me to learn basic Linux, and boy, I dont envy coders... not that I count anything in my guide as code.

The issue lies within paperspaces default gradient image, this I swear.

TheLastBen commented 6 months ago

OK, I'll check it out

TheLastBen commented 6 months ago

The problem has been fixed, everything works with the new python 3.11, no need to install anything, just make sure you use the latest notebooks, by copying them from the folder "latest_notebooks"

fartist123 commented 6 months ago

Very much appreciated! Your doing the lords work!

kocten7 commented 6 months ago

I can't believe it's working! Thank you very much for fixing this issue, @TheLastBen