easydiffusion icon indicating copy to clipboard operation
easydiffusion copied to clipboard

Make it repair itself after being relocated, or at least ask for a local .ckpt file

Open segersj2 opened this issue 3 years ago • 4 comments

I installed in my downloads folder to start with, decided I wanted to keep it, but when I moved it to a new folder (/home//Local-apps/SD-with-queing) it broke, and I tried to fix it, and now it's really broken and I'm going to reinstall. My plan is to kill the installer when it starts the .ckpt download, sub in the one I already have. My plan worked.

Ideally, I would like it to use relative paths, failing that, I would like it to fix itself after a move. Failing that, I would like a warning in the readme that this is a known issue and will not be fixed, put it in its final resting place before running start.sh the first time.

All that said, thank you for this wonderful program, I'm so grateful. :1st_place_medal:

segersj2 avatar Oct 03 '22 15:10 segersj2

if you are on Windows, inside the User folder there is a .conda folder, inside there is an enviroment.txt file with some paths. Find this for Linux, change that to your new path and see if it works

maikelsz avatar Oct 03 '22 19:10 maikelsz

I grepped for the path and got back something like 4000 places the path is hard coded with an absolute path, I grepped the results for ".conda" and that narrowed it to 783 possibilities. I grepped that for "env" and narrowed it to 540 results. I'm afraid this is beyond me. edit: I searched in the 4000 results file with a text editor - no occurrences of ".txt"

Thank you for the effort, I do appreciate it

segersj2 avatar Oct 05 '22 01:10 segersj2

Hi @segersj2 , yes conda doesn't like being moved.

I don't know how to repair a moved conda installation, but we can try.

If you re-run the installer, it'll update itself and create a open_dev_console.sh script (next to the start.sh script). Can you please run that script ./open_dev_console.sh and then run:

conda config --add pkgs_dirs <path to directory>/pkgs (replace with the correct path to the new directory) and conda config --add envs_dirs <path to directory>/envs

Source: https://stackoverflow.com/a/64363160

cmdr2 avatar Oct 07 '22 13:10 cmdr2

./open_dev_console needed to be made executable, no problem. next issue: conda is not in $PATH, so I found it in installer/bin/conda, and ran ./installer/bin/conds config --add pkgs_dirs /pkgs (properly replaced with actual path). Conda replied:

Traceback (most recent call last):
  File "/home/jj/Downloads/SD-with-queing/stable-diffusion-ui/./installer/bin/conda", line 12, in <module>
    from conda.cli import main
ModuleNotFoundError: No module named 'conda'

So I tried "cd"ing into installer/bin and calling it from there, same result.

HOWEVER, Whatever you changed, makes it work flawlessly from the start.sh - it Just Works! I'll be happy to help out, but it seems you've already fixed it, I tried moving it two times.

segersj2 avatar Oct 08 '22 02:10 segersj2

Glad it works!

cmdr2 avatar Oct 29 '22 07:10 cmdr2