Sygil-Dev / stable-diffusion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ModuleNotFoundError: No module named 'frontend'

vincentbeatty opened this issue · comments

Traceback (most recent call last):
File "C:\Users\beatt\Desktop\Offline AI Generation\stable-diffusion-main\stable-diffusion-main\scripts\webui.py", line 3, in
from frontend.frontend import draw_gradio_ui
ModuleNotFoundError: No module named 'frontend'
Relauncher: Process is ending. Relaunching in 0.5s...
Relauncher: Launching...
Relaunch count: 3

No idea what's going on here...

commented

Looks like you didn't install properly.

Same. Looks like it's stuck in dependency hell:
ERROR: Cannot install -r D:\Applications\stable-diffusion-main\condaenv.yykvm7ni.requirements.txt (line 23) and facexlib 0.2.4 (from git+https://github.com/hlky/facexlib#egg=facexlib) because these package versions have conflicting dependencies

commented

I have the same issue when creating the docker image.

After a fresh clone of the repo, I attempt docker-compose up --build, and after a while I get stuck in this loop:

sd  | Relaunch count: 19
sd  | Traceback (most recent call last):
sd  |   File "scripts/webui.py", line 3, in <module>
sd  |     from frontend.frontend import draw_gradio_ui
sd  | ModuleNotFoundError: No module named 'frontend'
sd  | entrypoint.sh: Process is ending. Relaunching in 0.5s...
sd  | entrypoint.sh: Launching...
sd  | Relaunch count: 20
sd  | Traceback (most recent call last):
sd  |   File "scripts/webui.py", line 3, in <module>
sd  |     from frontend.frontend import draw_gradio_ui
sd  | ModuleNotFoundError: No module named 'frontend'
sd  | entrypoint.sh: Process is ending. Relaunching in 0.5s...
sd  | entrypoint.sh: Launching...
sd  | Relaunch count: 21

I'm just seeing more output:

sd  | Installing pip dependencies: ...working... Pip subprocess error:
sd  | ERROR: Cannot install -r /sd/condaenv.pj4uksbo.requirements.txt (line 23) and facexlib 0.2.4 (from git+https://github.com/hlky/facexlib#egg=facexlib) because these package versions have conflicting dependencies.
sd  | ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
sd  | 
sd  | Ran pip subprocess with arguments:
sd  | ['/opt/conda/envs/ldm/bin/python', '-m', 'pip', 'install', '-U', '-r', '/sd/condaenv.pj4uksbo.requirements.txt']
sd  | Pip subprocess output:
sd  | Obtaining facexlib from git+https://github.com/hlky/facexlib#egg=facexlib (from -r /sd/condaenv.pj4uksbo.requirements.txt (line 20))
sd  |   Cloning https://github.com/hlky/facexlib to ./src/facexlib
sd  | Obtaining taming-transformers from git+https://github.com/CompVis/taming-transformers#egg=taming-transformers (from -r /sd/condaenv.pj4uksbo.requirements.txt (line 21))
sd  |   Cloning https://github.com/CompVis/taming-transformers to ./src/taming-transformers
sd  | Obtaining clip from git+https://github.com/openai/CLIP#egg=clip (from -r /sd/condaenv.pj4uksbo.requirements.txt (line 22))
sd  |   Cloning https://github.com/openai/CLIP to ./src/clip
sd  | Obtaining GFPGAN from git+https://github.com/TencentARC/GFPGAN#egg=GFPGAN (from -r /sd/condaenv.pj4uksbo.requirements.txt (line 23))
sd  |   Cloning https://github.com/TencentARC/GFPGAN to ./src/gfpgan
sd  | Obtaining realesrgan from git+https://github.com/xinntao/Real-ESRGAN#egg=realesrgan (from -r /sd/condaenv.pj4uksbo.requirements.txt (line 24))
sd  |   Cloning https://github.com/xinntao/Real-ESRGAN to ./src/realesrgan
sd  | Obtaining k_diffusion from git+https://github.com/hlky/k-diffusion-sd#egg=k_diffusion (from -r /sd/condaenv.pj4uksbo.requirements.txt (line 25))
sd  |   Cloning https://github.com/hlky/k-diffusion-sd to ./src/k-diffusion

I think I agree with @Wolfos's assessment about the dependency issue, even in the container

EDIT: Nope, seems to be related to #129

commented

Yes it was dependency issue caused by an update on gfpgan that bumped their requirement version of facexlib to 0.2.5, we forked at 0.2.4 to add a fix an issue related to selecting a gpu for gfpgan

Shouldn't need to pull changes, just run webui.cmd again

@hlky so we shouldn't need to re-download anything? I tried re-running this after hitting the same issue and I am running into it again.

I don't want to submit another issue report for this, but I just ran into it.

A bit of background for me is that I had this working yesterday, however I haven't updated for a while. I saw that there was new stuff, so I deleted my old version and began installing the newer version. Now whenever I run webui.cmd I get this error.

I know I installed it right since I went onto my laptop and installed it without a hitch there. So, I'm thinking it is because I had an older version before on my desktop.

Edit: And... now it randomly started working again. Spent hours trying to fix it, nothing worked. Went and had breakfast, and it now works. Confusing.