Nevysha / Cozy-Nest

A collection of tweak to improve Auto1111 UI//UX
Other
381 stars 17 forks source link

[Issue]: CozyNest does not start in A1111 #183

Closed ostap667inbox closed 1 year ago

ostap667inbox commented 1 year ago

What happened?

A bug happened!

Webui

Automatic1111's webui

What browsers are you seeing the problem on?

Chrome

Additional info

[CozyNest:INFO] version: 2.4.3 on unknown
[CozyNest:INFO] CozyNest: Image browser is disabled. To enable it, go to the CozyNest settings.
Creating model from config: C:\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
*** Error executing callback app_started_callback for C:\stable-diffusion-webui\extensions\Cozy-Nest\scripts\nevysha_cozy_nest.py
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui\modules\script_callbacks.py", line 126, in app_started_callback
        c.callback(demo, app)
      File "C:\stable-diffusion-webui\extensions\Cozy-Nest\scripts\nevysha_cozy_nest.py", line 217, in cozy_nest_api
        StaticFiles(directory=f"{cwd}/client/"),
      File "C:\stable-diffusion-webui\venv\lib\site-packages\starlette\staticfiles.py", line 57, in __init__
        raise RuntimeError(f"Directory '{directory}' does not exist")
    RuntimeError: Directory 'C:\stable-diffusion-webui\extensions\Cozy-Nest/client/' does not exist

---
Startup time: 12.2s (import torch: 1.8s, import gradio: 1.3s, import ldm: 0.5s, other imports: 1.0s, list SD models: 0.3s, load scripts: 3.3s, create ui: 2.6s, gradio launch: 0.8s, add APIs: 0.1s, app_started_callback: 0.4s).

Relevant browser log output

No response

Relevant log output from the webui

No response

Checklist

Golgovskiy commented 1 year ago

RuntimeError: Directory 'C:\stable-diffusion-webui\extensions\Cozy-Nest/client/' does not exist There seems to be an error in nevysha_cozy_nest.py:

def cozy_nest_api(_: Any, app: FastAPI, **kwargs):
    app.mount(
        "/cozy-nest-client/",
        StaticFiles(directory=f"{cwd}/client/"),
        name="cozy-nest-client",
    )

It probably should be

def cozy_nest_api(_: Any, app: FastAPI, **kwargs):
    app.mount(
        "/cozy-nest-client/",
        StaticFiles(directory=f"{cwd}/cozy-nest-client/"),
        name="cozy-nest-client",
    )

but it doesn't work for me anyway, even if error disappears. I don't know what else could it be.

oracle-jones commented 1 year ago

If you look at the last commit you can see that the client folder was completely deleted. Instead a new folder 'static' was introduced. Apparently something got mixed up :) I downloaded the zip of version 2.4.3, emptied the Cozy-Nest folder and copied the content of the zip into it. Now it works again.

Wait for the correction with the next update.

By the way: Thank you for the great work!

roll0ver commented 1 year ago

Same issue, rollback to 2.4.3 worked, thanks for that suggestion @oracle-jones!

obs945 commented 1 year ago

My solution is to create folder "client" under Cozy-Nest. Then I copy all the files/directories from "cozy-nest-client" to "client". So far it works.

Nevysha commented 1 year ago

I broke the build cycle in latest update. I just pushed a fix. It should be fixed if you update now, sorry for that