TheLastBen / fast-stable-diffusion

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

fast api not found #1706

Closed 2Suen closed 1 year ago

2Suen commented 1 year ago

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 7, in from fastapi import FastAPI ModuleNotFoundError: No module named 'fastapi'

didn't remove anything

Rb-diff commented 1 year ago

same, wondering if colab did something on their end

thecosss commented 1 year ago

Same here. What happened?

marioorg commented 1 year ago

same problem here, few hours ago all works fine.

d2speech commented 1 year ago

the same problem. I don't know how long ago it happened, it's been a couple of days

Dif-ro commented 1 year ago

i'm using colab been having this issue as well for a couple of days

diruuu commented 1 year ago

Same problem. Anyone got solution?

Omenizer commented 1 year ago

Same here, had no problem running it this afternoon. Renaming SD folder didn't help :(

d2speech commented 1 year ago

Same problem. Anyone got solution?

You have to wait for TheLastBen's answer. I think the problem is on Google's side. or rather they could have changed something in the GoogleColab. Unpleasant problem, I hope they fix it.

Omenizer commented 1 year ago

https://github.com/Linaqruf/kohya-trainer/issues/114

Did colab update Python?

d2speech commented 1 year ago

Linaqruf/kohya-trainer#114

Did colab update Python?

Then that explains it all. In that case, we just have to wait for it to be fixed.

cowliquid commented 1 year ago

I got mine working again by running this block before starting the webui:

!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt
!pip install open_clip_torch
!pip install git+https://github.com/openai/CLIP.git
!pip install xformers

Not sure if all the features work but at least it starts

TheLastBen commented 1 year ago

colab changed to python 3.9, I'll update the dependencies, it'll take some time

rektobot commented 1 year ago

be me find stranger cow on internet copy his code cause want to make pictures [this_will_certainly_go_well_for_me: 1.5 ] 5 minutes later... ded

SDS-MrD commented 1 year ago

Thank you for working on the update TheLastBen, you are our hero!

Hoozzych commented 1 year ago

The rationale behind the recent announcement by the Google Board of Directors to prohibit all Google Colab users from generating furry images and hentai depictions of young girls on their platform is as follows:

"The aforementioned types of content have been deemed inappropriate and potentially harmful by various legal and ethical standards. The proliferation of such materials not only runs the risk of perpetuating harmful stereotypes and objectification of vulnerable individuals, but may also lead to legal liabilities for the company. Therefore, in order to uphold our commitment to maintaining a safe and responsible online community, it is imperative that we take decisive action to prevent the creation and dissemination of such content on our platform"

Omenizer commented 1 year ago

The rationale behind the recent announcement by the Google Board of Directors to prohibit all Google Colab users from generating furry images and hentai depictions of young girls on their platform is as follows:

"The aforementioned types of content have been deemed inappropriate and potentially harmful by various legal and ethical standards. The proliferation of such materials not only runs the risk of perpetuating harmful stereotypes and objectification of vulnerable individuals, but may also lead to legal liabilities for the company. Therefore, in order to uphold our commitment to maintaining a safe and responsible online community, it is imperative that we take decisive action to prevent the creation and dissemination of such content on our platform"

Phew, good that I only generate landscapes

diruuu commented 1 year ago

The rationale behind the recent announcement by the Google Board of Directors to prohibit all Google Colab users from generating furry images and hentai depictions of young girls on their platform is as follows:

"The aforementioned types of content have been deemed inappropriate and potentially harmful by various legal and ethical standards. The proliferation of such materials not only runs the risk of perpetuating harmful stereotypes and objectification of vulnerable individuals, but may also lead to legal liabilities for the company. Therefore, in order to uphold our commitment to maintaining a safe and responsible online community, it is imperative that we take decisive action to prevent the creation and dissemination of such content on our platform"

Okay, but how do they gonna prevent that for something like AUTOMATIC1111 UI? It's not like they can see what we're generating.

Omenizer commented 1 year ago

What, you don't have a google drive linked

Hoozzych commented 1 year ago

The rationale behind the recent announcement by the Google Board of Directors to prohibit all Google Colab users from generating furry images and hentai depictions of young girls on their platform is as follows: "The aforementioned types of content have been deemed inappropriate and potentially harmful by various legal and ethical standards. The proliferation of such materials not only runs the risk of perpetuating harmful stereotypes and objectification of vulnerable individuals, but may also lead to legal liabilities for the company. Therefore, in order to uphold our commitment to maintaining a safe and responsible online community, it is imperative that we take decisive action to prevent the creation and dissemination of such content on our platform"

Okay, but how do they gonna prevent that for something like AUTOMATIC1111 UI? It's not like they can see what we're generating.

The rationale behind the recent announcement by the Google Board of Directors to prohibit all Google Colab users from generating furry images and hentai depictions of young girls on their platform is as follows: "The aforementioned types of content have been deemed inappropriate and potentially harmful by various legal and ethical standards. The proliferation of such materials not only runs the risk of perpetuating harmful stereotypes and objectification of vulnerable individuals, but may also lead to legal liabilities for the company. Therefore, in order to uphold our commitment to maintaining a safe and responsible online community, it is imperative that we take decisive action to prevent the creation and dissemination of such content on our platform"

Okay, but how do they gonna prevent that for something like AUTOMATIC1111 UI? It's not like they can see what we're generating.

im joking

chartercook commented 1 year ago

Screenshot 2023-03-08 100239 I'm having the same issue as well.

cosmicoxytocin commented 1 year ago

Screenshot 2023-03-08 100239 I'm having the same issue as well.

https://github.com/TheLastBen/fast-stable-diffusion/issues/1706#issuecomment-1460745037

sansetto1 commented 1 year ago

Everyone has this problem

sansetto1 commented 1 year ago

just wait

ElThunasFBI commented 1 year ago

just wait

This is the first time I've seen a bug in this Stable Diffusion colab notebook. How long does it usually take to fix a problem like this?

digital-soul18 commented 1 year ago

I got mine working again by running this block before starting the webui:

!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt
!pip install open_clip_torch
!pip install git+https://github.com/openai/CLIP.git
!pip install xformers

Not sure if all the features work but at least it starts

this hasn't worked for me, still asks for hundreds of more dependencies

chartercook commented 1 year ago

any news on this error?

2Suen commented 1 year ago

Bro I posted it today. Relax.

shekharP1536 commented 1 year ago

Same wondering lot of facing this problem I need solution.

chriswhite5918 commented 1 year ago

Same issue here...

Raruu commented 1 year ago

I got mine working by upgrading to python 3.10 and install dependencies. mouth drive,

Install Python3.10

!sudo apt-get update -y
!sudo apt-get install python3.10

#change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils
!wget https://bootstrap.pypa.io/get-pip.py
!python get-pip.py
!python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor

Install requirements

!pip install xformers clip open_clip_torch blendmodes accelerate basicsr fonts font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python requests piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm==0.4.12 transformers==4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1

then run the sd

EDIT: didn't know I should put ``` for code

diruuu commented 1 year ago

I got mine working by upgrading to python 3.10 and install dependencies. mouth drive,

`!sudo apt-get update -y !sudo apt-get install python3.10

change alternatives !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils !wget https://bootstrap.pypa.io/get-pip.py !python get-pip.py !python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor`

`!pip install xformers clip open_clip_torch blendmodes accelerate basicsr fonts font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python requests piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm==0.4.12 transformers==4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1`

then run the sd

This works, except for the localtunnel. I have no idea how to install it tho. Any help?

Malbios commented 1 year ago

Temporary workaround "till mid-March": Google offers a fallback runtime. You connect to a colab machine, CTRL+SHIFT+P for command palette, then search for fallback: image That reconnects to a different machine and should accept the old dependencies.

Gryphan1 commented 1 year ago

!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt !pip install open_clip_torch !pip install git+https://github.com/openai/CLIP.git !pip install xformers

this working

Liondroid commented 1 year ago

!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt !pip install open_clip_torch !pip install git+https://github.com/openai/CLIP.git !pip install xformers

this working

Hi, and where i have to past it?

Gryphan1 commented 1 year ago

!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt !pip install open_clip_torch !pip install git+https://github.com/openai/CLIP.git !pip install xformers this working

Hi, and where i have to past it?

button code, created cell before cell start

Liondroid commented 1 year ago

thanks, ill try

f4cyw commented 1 year ago

!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt !pip install open_clip_torch !pip install git+https://github.com/openai/CLIP.git !pip install xformers this working

Hi, and where i have to past it?

button code, created cell before cell start

Should I run this everytime?

Apathetikk commented 1 year ago

I got mine working by upgrading to python 3.10 and install dependencies. mouth drive,

`!sudo apt-get update -y !sudo apt-get install python3.10

change alternatives !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils !wget https://bootstrap.pypa.io/get-pip.py !python get-pip.py !python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor`

`!pip install xformers clip open_clip_torch blendmodes accelerate basicsr fonts font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python requests piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm==0.4.12 transformers==4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1`

then run the sd

^^works, although the second to last paragraph of code didn't run properly.

anyways, can run the SD after that

duskfallcrew commented 1 year ago

Hey you know you could just rollback your runtime it's easier - because NONE of the commands worked for me when i tried lol. Open clip failed and a bunch of other things.

aleqniko commented 1 year ago

Эй, вы знаете, что вы можете просто откатить свою среду выполнения, это проще - потому что НИ ОДНА из команд не работала для меня, когда я пробовал, лол. Не удалось открыть клип и куча других вещей.

how to do this?

aleqniko commented 1 year ago

Я заработал, перейдя на python 3.10 и установив зависимости. рот привод,

`!sudo apt-get update -y !sudo apt-get install python3.10

изменить альтернативы !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils !wget https://bootstrap.pypa.io/get-pip.py !python get-pip.py !python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor`

`!pip install xformers clip open_clip_torch режимы наложения ускоряют базовые шрифты font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python запросы piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm== 0.4.12 трансформаторы == 4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1`

затем запустите сд

I am a complete zero in programming, please tell me where to prescribe all this?

Raruu commented 1 year ago

Temporary workaround "till mid-March": Google offers a fallback runtime. You connect to a colab machine, CTRL+SHIFT+P for command palette, then search for fallback: image That reconnects to a different machine and should accept the old dependencies.

I can't find it

Meysmerized commented 1 year ago

Temporary workaround "till mid-March": Google offers a fallback runtime. You connect to a colab machine, CTRL+SHIFT+P for command palette, then search for fallback: image That reconnects to a different machine and should accept the old dependencies.

I can't find it

You need to be connected first, start your session then search. it'll be there

kieuvinh2412 commented 1 year ago

I got mine working by upgrading to python 3.10 and install dependencies. mouth drive,

Install Python3.10

!sudo apt-get update -y
!sudo apt-get install python3.10

#change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils
!wget https://bootstrap.pypa.io/get-pip.py
!python get-pip.py
!python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor

Install requirements

!pip install xformers clip open_clip_torch blendmodes accelerate basicsr fonts font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python requests piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm==0.4.12 transformers==4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1

then run the sd

EDIT: didn't know I should put ``` for code

it work for me, thank you

aleqniko commented 1 year ago

Thanks a lot dear friend It's work!!!

Nuku79 commented 1 year ago

Thanks a lot dear friend It's work!!!

Where should I run this script?

cuit0 commented 1 year ago

I got mine working by upgrading to python 3.10 and install dependencies. mouth drive,

Install Python3.10

!sudo apt-get update -y
!sudo apt-get install python3.10

#change alternatives
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils
!wget https://bootstrap.pypa.io/get-pip.py
!python get-pip.py
!python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor

Install requirements

!pip install xformers clip open_clip_torch blendmodes accelerate basicsr fonts font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python requests piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm==0.4.12 transformers==4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1

then run the sd

EDIT: didn't know I should put ``` for code

Thank you. It's work for me.

cerarslan commented 1 year ago

colab changed to python 3.9, I'll update the dependencies, it'll take some time

You are awesome big thx Ben!

GODMapper commented 1 year ago

Thank you very much the solution in my case was to install the following mentioned by the guys in the thread above. `!sudo apt-get update -y !sudo apt-get install python3.10

change alternatives

!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 !sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2

!sudo apt-get install python3.10-distutils !wget https://bootstrap.pypa.io/get-pip.py !python get-pip.py !python -m pip install ipython ipython_genutils ipykernel jupyter_console prompt_toolkit httplib2 astor

!pip install xformers clip open_clip_torch blendmodes accelerate basicsr fonts font-roboto gfpgan gradio==3.16.2 invisible-watermark numpy omegaconf opencv-contrib-python requests piexif Pillow pytorch_lightning==1.7.7 realesrgan scikit-image>=0.19 timm==0.4.12 transformers==4.25.1 torch einops jsonmerge clean-fid resize-right torchdiffeq kornia lark inflection GitPython torchsde safetensors psutil

!pip install --upgrade fastapi==0.90.1 !pip install "fastapi[all]" !pip install "gradio[all]" !pip install "lpips[all]" !pip install "basicsr[all]" !pip install GitPython !pip install safetensors !pip install omegaconf !pip install transformers !pip install open_clip`

TheLastBen commented 1 year ago

fixed