TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.46k stars 1.3k forks source link

ModuleNotFoundError: No module named 'pyngrok' #2019

Open GitGitHubUser opened 1 year ago

GitGitHubUser commented 1 year ago

Hello, after a few hours using fast-SD on google colab I got the following error:

ModuleNotFoundError Traceback (most recent call last)

in () 4 import sys 5 import fileinput ----> 6 from pyngrok import ngrok, conf 7 8 Use_Cloudflare_Tunnel = False #@param {type:"boolean"} ModuleNotFoundError: No module named 'pyngrok' And now the error comes back every 30 minutes or so. Afterwards I need to start from scratch. Any ideas how to fix it? Many thanks!
TheLastBen commented 1 year ago

each time you start a fresh session, you need to run the cells from the top

Toshik-One commented 1 year ago

each time you start a fresh session, you need to run the cells from the top

I got this error after I completed the code and then ran .

ModuleNotFoundError Traceback (most recent call last) in <cell line: 6>() 4 import sys 5 import fileinput ----> 6 from pyngrok import ngrok, conf 7 8 Use_Cloudflare_Tunnel = True #@param {type:"boolean"}

ModuleNotFoundError: No module named 'pyngrok'

NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

TheLastBen commented 1 year ago

Copy the requirements cell here

Toshik-One commented 1 year ago

Copy the requirements cell here

@markdown # Requirements

print('Installing requirements...')

with capture.capture_output() as cap: %cd /content/ !wget -q -i https://raw.githubusercontent.com/TheLastBen/fast-stable-diffusion/main/Dependencies/A1111.txt !dpkg -i .deb if not os.path.exists('/content/gdrive/'+mainpth+'/sd/stablediffusion'): !tar -C /content/gdrive/$mainpth --zstd -xf sd_rep.tar.zst !tar -C / --zstd -xf gcolabdeps.tar.zst !rm .deb | rm .zst | rm .txt %env LD_PRELOAD=libtcmalloc.so os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' os.environ['PYTHONWARNINGS'] = 'ignore' if Use_Latest_Working_Commit: !pip install gradio==3.16.2 --no-deps -qq else: !pip install gradio==3.23 --no-deps -qq

clear_output() inf('\u2714 Done','success', '50px')

TheLastBen commented 1 year ago

you're still getting the error ?

Toshik-One commented 1 year ago

you're still getting the error ?

Not yet If more comes up I'll post it.

GitGitHubUser commented 1 year ago

I am still getting the error every 30 minutes or so. And I am starting from scratch every time, so I run all the cells from the top. Any idea why is it happening? Many thanks!

TheLastBen commented 1 year ago

are you restarting the runtime ?

GitGitHubUser commented 1 year ago

nope, I am not restarting anything, just the error above comes and doesn't go away until I restart everything completely from scratch

TheLastBen commented 1 year ago

does the error happen during a running session ? you should know that everytime you start a new session, you'll need to run all the cells from the top

veretelnikov commented 1 year ago

Dear Friend. Thank you for your work. But my program does not work, every 30 minutes it closes with an error. I have a paid version of Colab, but that doesn't help either. I have to delete everything from Google Disc each time and install again. Help me please.


ModuleNotFoundError Traceback (most recent call last) in <cell line: 6>() 4 import sys 5 import fileinput ----> 6 from pyngrok import ngrok, conf 7 8 Use_Cloudflare_Tunnel = False #@param {type:"boolean"}

ModuleNotFoundError: No module named 'pyngrok'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

FireShot Capture 003 - Копия блокнота _fast_stable_diffusion_AUTOMATIC1111 ipynb_ - Colabora_ - colab research google com

veretelnikov commented 1 year ago

does the error happen during a running session ? you should know that everytime you start a new session, you'll need to run all the cells from the top

I generate pictures, all is well and after 30 minutes a new generation comes out an error that the session is complete, I open Colab and there is the error I wrote above

TheLastBen commented 1 year ago

a new generation comes out an error that the session is complete

what do you mean by "the session is complete" ?

veretelnikov commented 1 year ago

a new generation comes out an error that the session is complete

what do you mean by "the session is complete" ?

Снимок экрана 2023-04-25 в 01 49 36
TheLastBen commented 1 year ago

possibly colab stopped the session ?

veretelnikov commented 1 year ago

possibly colab stopped the session ?

yes and text

ModuleNotFoundError Traceback (most recent call last) in <cell line: 6>() 4 import sys 5 import fileinput ----> 6 from pyngrok import ngrok, conf 7 8 Use_Cloudflare_Tunnel = False #@param {type:"boolean"}

ModuleNotFoundError: No module named 'pyngrok'

TheLastBen commented 1 year ago

probably colab now is kicking free users after 30 minutes of SD

veretelnikov commented 1 year ago

probably colab now is kicking free users after 30 minutes of SD

I wrote to you above that I have a paid version of Colab

TheLastBen commented 1 year ago

Try using ngrok and see if the issue persists

buckwheaton commented 1 year ago

I'm getting this error now too. Paid colab, happens whether or not I add an ngrok token. First time it's happened to me.

Jamztradamus commented 1 year ago

Me too, same error message on a paid colab, tried all the fixes suggested here. I'm stuck.

rayvinscreative commented 1 year ago

I'm in the same bucket as @buckwheaton and @Jamztradamus . I'm a paid colab user and this error just now appeared. I was successfully running the colab earlier today, deleted my runtime, came back about an hour or so, connected to a new runtime, ran all the cells from the top and once the colab got to the "Start Stable-Diffusion" cell: ModuleNotFoundError Traceback (most recent call last) in <cell line: 6>() 4 import sys 5 import fileinput ----> 6 from pyngrok import ngrok, conf


I installed pyngrok. Then got an error for fastapi. I installed that. Now I get the following error: Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 21, in import pytorch_lightning # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them ModuleNotFoundError: No module named 'pytorch_lightning'

TheLastBen commented 1 year ago

@rayvinscreative fixed now, update your notebook

rayvinscreative commented 1 year ago

Awesome thank you!

veretelnikov commented 1 year ago

@rayvinscreative fixed now, update your notebook

LDSR disappeared

Снимок экрана 2023-05-02 в 17 02 06
veretelnikov commented 1 year ago

it was the best way to increase the quality of the photo

AlanHHeinze commented 1 year ago

Sr The Last Ben I have the same error a week ago and I can't find how to solve it, I already reinstalled the notebook more than three times, run it from another account and I get the same error. I saw that you told another user to install pyngrok (After searching a bit on the internet I found how to install it with CMD, but I'm not sure if this has something to do with the notebook) If it's not too much trouble, could you explain the steps and where to install pyngrok?

Sorry for my English I'm using a translator

TheLastBen commented 1 year ago

try using the latest notebook from the official link and let me know if the issue persists

AlanHHeinze commented 1 year ago

I am using the google colab version

https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

I can't find a newer version of that notebook

Thank you very much for answering

TheLastBen commented 1 year ago

the link you gave is correct, try reproducing the error then do a screenshot

AlanHHeinze commented 1 year ago

The first time I run the notebook it works perfect, but after generating 4 or 5 it stops without giving any error.

When I want to run the notebook again I get this error error1

In the part of the code the error is indicated there error2

TheLastBen commented 1 year ago

that error happens because SD doesn't work with free colab anymore

AlanHHeinze commented 1 year ago

Thank you very much for answering and for the advice

Edwardyn commented 1 year ago

image

Edwardyn commented 1 year ago

if i buy the colab pro will it work normally?

Edwardyn commented 1 year ago

I acquired colab pro and the error continues :/

TheLastBen commented 1 year ago

you need to run all the cells from the top

GuzztMega commented 1 year ago

a new generation comes out an error that the session is complete

what do you mean by "the session is complete" ?

Снимок экрана 2023-04-25 в 01 49 36

I received this message too... the link was generated and i could open de SD UI but a time after that ( 5-10min maximum) a notification like this appeared and a message like the one belowe appears when I try to restart SD... Could they be blocking Colab integration?

ModuleNotFoundError Traceback (most recent call last) in <cell line: 6>() 4 import sys 5 import fileinput ----> 6 from pyngrok import ngrok, conf 7 8 Use_Cloudflare_Tunnel = False #@param {type:"boolean"}

ModuleNotFoundError: No module named 'pyngrok'


NOTE: If your import is failing due to a missing package, you can manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the "Open Examples" button below.

Edwardyn commented 1 year ago

Thank you very much @TheLastBen, I managed to make some videos

Asrael88 commented 1 year ago

that error happens because SD doesn't work with free colab anymore

Where can I pay to use it then? Should I pay here for "Colab Pro"?

https://colab.research.google.com/signup/pricing?utm_source=resource_tab&utm_medium=link&utm_campaign=payg_learn_more

TheLastBen commented 1 year ago

@Asrael88 yes, once paid, set the runtime to High-RAM in colab

Asrael88 commented 1 year ago

@Asrael88 yes, once paid, set the runtime to High-RAM in colab

Now I need to understand how can I do that. But thank you anyway!

TheLastBen commented 1 year ago

@Asrael88 in colab menu, go to runtime then runtime settings