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

latest environment.yaml does not result in functional env #63

Closed
bmaltais opened this issue Aug 24, 2022 · 14 comments
Closed

latest environment.yaml does not result in functional env #63

bmaltais opened this issue Aug 24, 2022 · 14 comments

Comments

@bmaltais
Copy link

bmaltais commented Aug 24, 2022

I just tried to run the solution on a new wsl2 "vm" with a fresh miniconda install using the provided environment.yaml and upon running python script/dream.py I get the usual load model but after that everything stop without any error...

(sdbm) bernard@DESKTOP-4M9DSE4:~/stable-diffusion-bm$ python scripts/dream.py --sampler klms
* Initializing, be patient...

Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Using half precision math. Call with --full_precision to use slower but more accurate full precision.
(sdbm) bernard@DESKTOP-4M9DSE4:~/stable-diffusion-bm$

Yes, I renamed the env from ldm to sdbm because I have too many repos I play with and they all use the same "ldm" name and this does not work well with conflicting requirements fort each... so I renamed the env in the environment.yaml file to make them per "repo".

If I then load my previous conda env with the original build from a fews days ago environment.yaml all is fine... Not sure what is missing but something is causing things to not work with the current yaml.

When it work under my previous ldm2 env I get e line about setting up the sampler that does not get shown with the latest commit:

(ldm2) bernard@DESKTOP-4M9DSE4:~/stable-diffusion-bm$ python scripts/dream.py --sampler klms
* Initializing, be patient...

Loading model from models/ldm/stable-diffusion-v1/model.ckpt
Global Step: 470000
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Using half precision math. Call with --full_precision to use slower but more accurate full precision.
setting sampler to klms

* Initialization done! Awaiting your command (-h for help, 'q' to quit, 'cd' to change output dir, 'pwd' to print output dir)...
dream>
@codedealer
Copy link
Contributor

I forked this repo a couple hours ago on a fresh machine (win10). Everything worked as expected.

@lstein
Copy link
Collaborator

lstein commented Aug 24, 2022

Huh. I did a fresh install a few days ago and it was working ok. Haven't changed environment.yaml for quite a while, but I'll take a look.

@Zincr0
Copy link

Zincr0 commented Aug 24, 2022

tested today, running conda env create -f environment.yaml just hangs forever on "Installing pip dependencies".

@vini2003
Copy link

Same issue as @Zincr0. Happens with all Stable Diffusion repositories, unable to install at all.

@Zincr0
Copy link

Zincr0 commented Aug 25, 2022

I suspect it's related to the wrongly closed bug conda/conda#10807

@Evilu
Copy link

Evilu commented Aug 25, 2022

Same issue as @Zincr0. Happens with all Stable Diffusion repositories, unable to install at all.

And i was thinking it's only me.

Yesterday everything worked perfectly, i was just cleanining my env for something and becasue it been frozen i was thinking i'm doing something wrong.

Edit: just tried the version from yesterady and it worked there.

@vini2003
Copy link

Same issue as @Zincr0. Happens with all Stable Diffusion repositories, unable to install at all.

And i was thinking it's only me.

Yesterday everything worked perfectly, i was just cleanining my env for something and becasue it been frozen i was thinking i'm doing something wrong.

Edit: just tried the version from yesterady and it worked there.

Could you attach the working version in a comment? I'd like to test it here, but am not sure which commit you're using.

@Evilu
Copy link

Evilu commented Aug 25, 2022

Same issue as @Zincr0. Happens with all Stable Diffusion repositories, unable to install at all.

And i was thinking it's only me.
Yesterday everything worked perfectly, i was just cleanining my env for something and becasue it been frozen i was thinking i'm doing something wrong.
Edit: just tried the version from yesterady and it worked there.

Could you attach the working version in a comment? I'd like to test it here, but am not sure which commit you're using.

Any idea how to do this if I didn't use git clone but just downloaded it zipped via the web hitting the green button?

@Zincr0
Copy link

Zincr0 commented Aug 25, 2022

You can workaround this by aborting the install when it hangs at "installing pip dependencies", and then installing each pip dependency manually (the ones listed on environment.yaml)

@Birch-san
Copy link

Birch-san commented Aug 25, 2022

if it's hanging because pip is trying (silently) to prompt you "this path already exists; should I overwrite it?" (i.e. conda/conda#10807), then try setting PIP_EXISTS_ACTION environment variable to tell pip how to resolve the interactive prompt:

PIP_EXISTS_ACTION=w conda env create -f environment.yml

@Birch-san
Copy link

the problem is probably that you already have one of these directories:

src/taming-transformers
src/CLIP

created by a previous installation attempt.

so, pip's like "hey there's already a file there; what should I do?"

you could probably solve this by running git clean (with appropriate options) then trying conda create again.

@thallada
Copy link

I got through the endless Installing pip dependencies / spinner by spamming w and the Enter key in the console.

@Evilu
Copy link

Evilu commented Aug 26, 2022

OK! i have managed to solve it, here's what worked for me:
as Birch-san said, first of all, make sure you not having any useless files by hitting
git clean -f
Then clean conda using:
conda clean -all
and that's it, install the enviroment and your'e rady to go.

Cool, now when i'm synced with everyone i can also start making pull requests

@lstein
Copy link
Collaborator

lstein commented Aug 27, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants