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

gradio module error? post the details of your setup here #42

Closed
hlky opened this issue Aug 26, 2022 · 21 comments
Closed

gradio module error? post the details of your setup here #42

hlky opened this issue Aug 26, 2022 · 21 comments
Labels
pebkac question Further information is requested

Comments

@hlky
Copy link
Contributor

hlky commented Aug 26, 2022

operating system:

version (10, 11 etc), build (21h2 etc)
language
do you have git4windows installed?

conda

did you install as all users?
if you answered yes, are you sure?

stable-diffusion repo

directory location
directory listing (dir /b from cmd or cmd /c dir /b from powershell)
first line of environment.yaml
did the stable-refusion repo exist previously? or was it a fresh clone (as in the stable-diffusion directory did not exist at all until you did git clone or downloaded the zip)
did you git clone or did you download the zip

launching

run webui.cmd from cmd/powershell
post the output from the line where you ran it to the first gradio error (do not post the repeated error messages... just once is fine)

Requested information could change, if you are asked to please post it again with the extra information

@hlky hlky added question Further information is requested pebkac labels Aug 26, 2022
@heartlocket
Copy link

heartlocket commented Aug 26, 2022

Trying to install and getting stuck in a module not found loop.

System info: Windows 11 Pro 64 bit 21H2 22000.856
I have a fresh anaconda install from a few days ago.
git4windows installed
I had the previous model installed elsewhere
I already have the full version of anaconda installed, made sure that the script locations match the paths in webui. I followed instructions closely but every time i try and run webui i get stuck in an error loop:

Traceback (most recent call last):
File "C:\Users\heart\Desktop\DEV\stable-diffusion-main\stable-diffusion-main\scripts\webui.py", line 2, in
import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Relauncher: Process is ending. Relaunching in 0.5s...

I have tried 'pip install gradio' before running it, this didnt help either.
help!!

my bad feel free to close my other issue reposting here

@hlky
Copy link
Contributor Author

hlky commented Aug 26, 2022

@heartlocket post all the requested information

@ShinkoNet
Copy link
Contributor

ShinkoNet commented Aug 26, 2022

Run webuildm.cmd instead of webui.cmd and see if that works.

Else, did you change your environment.yaml's first line from ldm to something else?
If so, that's a step that should be removed from the rentry instructions.
For now, edit the texts in both in webui.cmd and ldm.cmd and change any mention of ldo or ldm there to the word you changed in environment.yaml

@hlky
Copy link
Contributor Author

hlky commented Aug 26, 2022

and ldm.cmd

Is it possible people are ignoring the instructions and trying to mix the shortcut and webui.cmd?

The shortcut (and ldm.cmd) is for ldm, webui.cmd is ldo, webuildm.cmd is ldm

Like you and I have already said, it seems likely that this issue is due to the instruction to change the environment.yaml, combined with the old guides still existing, and certain people's inability to read and follow the instructions

Some people could be 'updating' by copying the files from hlky/stable-diffusion to the directory they had previously used

Alternatively, considering at least 2 (or 1 if its the same person) is having the issue with Windows 11, that it's a Windows 11 issue

Honestly it's impossible to tell because the people having issues all seem to be completely incapable of following instructions, and won't provide all the information requested

@ShinkoNet
Copy link
Contributor

It could be possible. I remember another guide had the environment set to ldx or lda.
We should ask what environment is installed on their system (shown in the env path in their condabin)

@heartlocket
Copy link

I was able to fix it with a fresh conda install. So I don't think its windows 11. I must have missed something, but no idea what it is. sorry~!

@hlky
Copy link
Contributor Author

hlky commented Aug 26, 2022

Some user was running webui.cmd from conda, so that's another possible fix for anyone else, just double click it in the folder, or run it from cmd/powershell (I asked for this way for debugging because it would show all the output easier, and the output is still accessible - if the .cmd were to unexpectedly close the output is gone)

Glad to hear it's fixed though

@heartlocket
Copy link

Thanks!

@MarcusMcNut
Copy link

MarcusMcNut commented Aug 26, 2022

Here are the following changes that I needed to make to the yaml to get the WebUI to work. I hope others will find this helpful. I added gradio and pynvml to the pips and an -e git+https://github.com/hlky/k-diffusion-sd#egg=k_diffusion`

removed to avoid confusion

@hlky
Copy link
Contributor Author

hlky commented Aug 26, 2022

You needed to just use the environment.yaml, you must have been using an old repo, it already has all of that, and gfpgan, you're missing gfpgan from that.

I've removed that part of your comment to avoid confusion

@MarcusMcNut
Copy link

MarcusMcNut commented Aug 26, 2022 via email

@hlky
Copy link
Contributor Author

hlky commented Aug 26, 2022

you can't use webui.py with that repo, this is a fork that has made several changes to the environment.yaml to enable support for the new features added
Remove any old environment with conda env remove -n also just delete any stable-diffusion folders, dont forget to move the model.ckpt out beforehand otherwise you'll have to download it again, then start following the guide again from scratch
i'll ask the guide maintainer to clarify all of this in the guide to try and prevent these kind of issues occurring

@MarcusMcNut
Copy link

MarcusMcNut commented Aug 26, 2022 via email

@hlky
Copy link
Contributor Author

hlky commented Aug 26, 2022

Like I said you didn't need to change environment.yaml, if you downloaded stable-diffusion from hlky/stable-diffusion it already has everything required

hlky/stable-diffusion-webui repo specifically is for the development of the webui and changes are synced to hlky/stable-diffusion soon after being pushed here, a small delay allows for any bug fixes that are found after a push

i have asked the guide maintainer to not link directly to this repo because it's mainly for developers and evidently is causing issues where people think they can drop webui.py from hlky/stable-diffusion-webui in anywhere and expect it to work (and also claim they followed the instructions to the letter, conveniently leaving out the part where they didn't)

@MarcusMcNut
Copy link

MarcusMcNut commented Aug 26, 2022 via email

@Muskelmagier
Copy link

I now know what in my case was the problem You have to type in "conda activate ldo" that fixes the whole problem.

@MarcusMcNut
Copy link

@hlky thank you for your help last night, I'm making sure to share the information with folks in the discord when they're running into the same issues as I, to be sure to use your stable-diffusion fork repo not this one.

@TwistedFromArma
Copy link

i too have the issue. I have used latest version and lmo change in the file.

@lozenge
Copy link

lozenge commented Aug 27, 2022

I just solved this problem on my own machine (Windows 10 Pro 20H2) by installing OpenSSL.

I specifically installed the "Win64 OpenSSL v1.1.1q Light" version from https://slproweb.com/products/Win32OpenSSL.html.

Hopefully this helps!

@hlky
Copy link
Contributor Author

hlky commented Aug 28, 2022

Discussion for this will move to 'Discussions'
Info to the Wiki

@ThisIsJustARandomGuy
Copy link

This just happened to me after doing a conda clean --all right after the first install. Deleting z_version_env.tmp and running update_to_latest.cmd solved it for me, in case anyone else runs into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pebkac question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants