Rename environment files to use default .yml extension

This commit is contained in:
Chris Hayes 2022-09-27 00:58:05 -04:00 committed by Lincoln Stein
parent 8366eee9c2
commit fb0341fdbf
9 changed files with 24 additions and 46 deletions

View File

@ -13,10 +13,10 @@ jobs:
id: vars
run: |
if [ "$RUNNER_OS" = "macOS" ]; then
echo "::set-output name=ENV_FILE::environment-mac.yaml"
echo "::set-output name=ENV_FILE::environment-mac.yml"
echo "::set-output name=PYTHON_BIN::/usr/local/miniconda/envs/ldm/bin/python"
elif [ "$RUNNER_OS" = "Linux" ]; then
echo "::set-output name=ENV_FILE::environment.yaml"
echo "::set-output name=ENV_FILE::environment.yml"
echo "::set-output name=PYTHON_BIN::/usr/share/miniconda/envs/ldm/bin/python"
fi
- name: Checkout sources

View File

@ -19,10 +19,10 @@ jobs:
run: |
# Note, can't "activate" via github action; specifying the env's python has the same effect
if [ "$RUNNER_OS" = "macOS" ]; then
echo "::set-output name=ENV_FILE::environment-mac.yaml"
echo "::set-output name=ENV_FILE::environment-mac.yml"
echo "::set-output name=PYTHON_BIN::/usr/local/miniconda/envs/ldm/bin/python"
elif [ "$RUNNER_OS" = "Linux" ]; then
echo "::set-output name=ENV_FILE::environment.yaml"
echo "::set-output name=ENV_FILE::environment.yml"
echo "::set-output name=PYTHON_BIN::/usr/share/miniconda/envs/ldm/bin/python"
fi
- name: Checkout sources

View File

@ -13,7 +13,7 @@ incomplete installations or crashes during the install process.
### **QUESTION**
During `conda env create -f environment.yaml`, conda hangs indefinitely.
During `conda env create`, conda hangs indefinitely.
If it is because of the last PIP step (usually stuck in the Git Clone step, you can check the detailed log by this method):
```bash
@ -67,8 +67,8 @@ Reinstall the stable diffusion modules. Enter the `stable-diffusion` directory a
### **SOLUTION**
From within the `stable-diffusion` directory, run `conda env update -f environment.yaml` This is
also frequently the solution to complaints about an unknown function in a module.
From within the `stable-diffusion` directory, run `conda env update` This is also frequently the solution to
complaints about an unknown function in a module.
---
@ -83,8 +83,7 @@ There's a feature or bugfix in the Stable Diffusion GitHub that you want to try
If the fix/feature is on the `main` branch, enter the stable-diffusion directory and do a
`git pull`.
Usually this will be sufficient, but if you start to see errors about missing or incorrect modules,
use the command
Usually this will be sufficient, but if you start to see errors about missing or incorrect modules, use the command `pip install -e .` and/or `conda env update` (These commands won't break anything.)
`pip install -e .` and/or

View File

@ -44,7 +44,7 @@ This will create InvokeAI folder where you will follow the rest of the steps.
```
(base) ~/InvokeAI$ conda env create -f environment.yaml
(base) ~/InvokeAI$ conda env create
(base) ~/InvokeAI$ conda activate ldm
(ldm) ~/InvokeAI$
```

View File

@ -122,6 +122,7 @@ ln -s "$PATH_TO_CKPT/sd-v1-4.ckpt" \
&& conda activate ldm
```
=== "Intel x86_64"
```bash
@ -147,19 +148,9 @@ python scripts/orig_scripts/txt2img.py \
--plms
```
1. half-precision requires autocast which is unfortunatelly incompatible
!!! note
`#!bash export PIP_EXISTS_ACTION=w` is a precaution to fix a problem where
```bash
conda env create \
-f environment-mac.yaml
```
did never finish in some situations. So it isn't required but wont hurt.
Note, `export PIP_EXISTS_ACTION=w` is a precaution to fix `conda env
create -f environment-mac.yml` never finishing in some situations. So
it isn't required but wont hurt.
---
## Common problems
@ -199,14 +190,7 @@ conda install \
-n ldm
```
If it takes forever to run
```bash
conda env create \
-f environment-mac.yaml
```
you could try to run:
If it takes forever to run `conda env create -f environment-mac.yml`, try this:
```bash
git clean -f
@ -247,9 +231,7 @@ There are several causes of these errors:
```bash
conda deactivate
conda env remove -n ldm
PIP_EXISTS_ACTION=w CONDA_SUBDIR=osx-arm64 \
conda env create \
-f environment-mac.yaml
conda env create -f environment-mac.yml
```
4. If you have activated the ldm virtual environment and tried rebuilding it,
@ -396,9 +378,7 @@ python scripts/preload_models.py
```
This fork already includes a fix for this in
[environment-mac.yaml](https://github.com/invoke-ai/InvokeAI/blob/main/environment-mac.yaml).
---
[environment-mac.yml](https://github.com/invoke-ai/InvokeAI/blob/main/environment-mac.yml).
### "Could not build wheels for tokenizers"

View File

@ -54,11 +54,10 @@ cd InvokeAI
6. Run the following two commands:
```batch
conda env create -f environment.yaml
conda activate ldm
```
```
conda env create (step 6a)
conda activate ldm (step 6b)
```
This will install all python requirements and activate the "ldm" environment
which sets PATH and other environment variables properly.
@ -122,7 +121,7 @@ latest and greatest version, launch the Anaconda window, enter
```bash
git pull
conda env update -f environment.yaml
conda env update
```
This will bring your local copy into sync with the remote one.

View File

@ -39,8 +39,8 @@ lightweight and runs on a GPU with at least 10GB VRAM. See
A suitable [conda](https://conda.io/) environment named `ldm` can be created and
activated with:
```bash
conda env create -f environment.yaml
```
conda env create
conda activate ldm
```

View File

@ -14,7 +14,7 @@ dependencies:
# To determine what the latest versions should be, run:
#
# ```shell
# sed -E 's/ldm/ldm-updated/;20,99s/- ([^=]+)==.+/- \1/' environment-mac.yaml > environment-mac-updated.yml
# sed -E 's/ldm/ldm-updated/;20,99s/- ([^=]+)==.+/- \1/' environment-mac.yml > environment-mac-updated.yml
# CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac-updated.yml && conda list -n ldm-updated | awk ' {print " - " $1 "==" $2;} '
# ```
- albumentations==1.2.1