InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

dream_web.py gone from the code?

Open arothmanmusic opened this issue 4 years ago • 5 comments

I just did a 'git pull' and the python scripts\dream_web.py no longer works as described in the instructions. I tried dream.py --web and it does load a page, but the CSS and JS aren't found. Is there something wonky going on with my setup or is there a new method I need to use for the GUI?

arothmanmusic avatar Aug 29 '22 20:08 arothmanmusic

Nice catch on the instructions being stale; I'll submit a PR updating those.

Re: "the CSS and JS aren't found", that's probably this issue; you could try the fix in that PR (specifically the change to ldm/dream/server.py).

bakkot avatar Aug 29 '22 20:08 bakkot

Thanks @bakkot - Adding the .lower() to the code fixed the paths.

arothmanmusic avatar Aug 29 '22 20:08 arothmanmusic

@arothmanmusic would you be up for trying out this change too? I like that fix better but I'm not in a position to test if it works, and it sounds like you are.

That is, replace the

            cwd = os.getcwd().lower()
            is_in_cwd = os.path.commonprefix((os.path.realpath(path).lower(), cwd)) == cwd

lines with

            cwd = os.path.realpath(os.getcwd())
            is_in_cwd = os.path.commonprefix((os.path.realpath(path), cwd)) == cwd

and confirm it still works.

bakkot avatar Aug 29 '22 20:08 bakkot

@bakkot I've swapped those lines and restarted the server. Seems to work just as well that way as it did the other!

arothmanmusic avatar Aug 29 '22 20:08 arothmanmusic

Should be fixed on main between https://github.com/lstein/stable-diffusion/pull/198 and https://github.com/lstein/stable-diffusion/pull/192. Thanks for the report.

bakkot avatar Aug 29 '22 21:08 bakkot