From d87bd29a6862996d8a0980c1343b6f0d4eb718b4 Mon Sep 17 00:00:00 2001 From: bsilvereagle Date: Mon, 26 Sep 2022 01:02:21 -0400 Subject: [PATCH 1/2] Change to InvokeAI git repo and folder names --- docs/installation/INSTALL_WINDOWS.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/installation/INSTALL_WINDOWS.md b/docs/installation/INSTALL_WINDOWS.md index 238988a15a..a6a733e8b5 100644 --- a/docs/installation/INSTALL_WINDOWS.md +++ b/docs/installation/INSTALL_WINDOWS.md @@ -33,15 +33,15 @@ in the wiki 4. Run the command: ``` -git clone https://github.com/lstein/stable-diffusion.git +git clone https://github.com/invoke-ai/InvokeAI.git ``` This will create stable-diffusion folder where you will follow the rest of the steps. -5. Enter the newly-created stable-diffusion folder. From this step forward make sure that you are working in the stable-diffusion directory! +5. Enter the newly-created InvokeAI folder. From this step forward make sure that you are working in the InvokeAI directory! ``` -cd stable-diffusion +cd InvokeAI ``` 6. Run the following two commands: @@ -74,7 +74,7 @@ Note: This step is required. This was done because some users may might be block - The weight file is >4 GB in size, so downloading may take a while. -Now run the following commands from **within the stable-diffusion directory** to copy the weights file to the right place: +Now run the following commands from **within the InvokeAI directory** to copy the weights file to the right place: ``` mkdir -p models\ldm\stable-diffusion-v1 @@ -94,7 +94,7 @@ python scripts\dream.py -l python scripts\dream.py ``` -10. Subsequently, to relaunch the script, first activate the Anaconda command window (step 3),enter the stable-diffusion directory (step 5, `cd \path\to\stable-diffusion`), run `conda activate ldm` (step 6b), and then launch the dream script (step 9). +10. Subsequently, to relaunch the script, first activate the Anaconda command window (step 3),enter the InvokeAI directory (step 5, `cd \path\to\InvokeAI`), run `conda activate ldm` (step 6b), and then launch the dream script (step 9). **Note:** Tildebyte has written an alternative ["Easy peasy Windows install"](https://github.com/lstein/stable-diffusion/wiki/Easy-peasy-Windows-install) @@ -102,7 +102,7 @@ which uses the Windows Powershell and pew. If you are having trouble with Anacon ### Updating to newer versions of the script -This distribution is changing rapidly. If you used the `git clone` method (step 5) to download the stable-diffusion directory, then to update to the latest and greatest version, launch the Anaconda window, enter `stable-diffusion`, and type: +This distribution is changing rapidly. If you used the `git clone` method (step 5) to download the InvokeAI directory, then to update to the latest and greatest version, launch the Anaconda window, enter `InvokeAI`, and type: ``` git pull From b1a3fd945d1863a547b4375a094f1eca091986b2 Mon Sep 17 00:00:00 2001 From: Chris Hayes <6013871+Christopher-Hayes@users.noreply.github.com> Date: Tue, 27 Sep 2022 00:58:05 -0400 Subject: [PATCH 2/2] Rename environment files to use default .yml extension --- .github/workflows/create-caches.yml | 4 ++-- .github/workflows/test-dream-conda.yml | 4 ++-- docs/CHANGELOG.md | 4 ++-- docs/README-CompViz.md | 2 +- docs/features/UPSCALE.md | 2 +- docs/help/TROUBLESHOOT.md | 6 +++--- docs/installation/INSTALL_LINUX.md | 2 +- docs/installation/INSTALL_MAC.md | 10 +++++----- docs/installation/INSTALL_WINDOWS.md | 6 +++--- environment-mac.yaml => environment-mac.yml | 2 +- environment.yaml => environment.yml | 0 11 files changed, 21 insertions(+), 21 deletions(-) rename environment-mac.yaml => environment-mac.yml (96%) rename environment.yaml => environment.yml (100%) diff --git a/.github/workflows/create-caches.yml b/.github/workflows/create-caches.yml index 951718af1b..e21286a407 100644 --- a/.github/workflows/create-caches.yml +++ b/.github/workflows/create-caches.yml @@ -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 diff --git a/.github/workflows/test-dream-conda.yml b/.github/workflows/test-dream-conda.yml index 3bd9b24582..278bf1b57d 100644 --- a/.github/workflows/test-dream-conda.yml +++ b/.github/workflows/test-dream-conda.yml @@ -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 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 31dc8e80db..f0d61aeb97 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -119,14 +119,14 @@ - A copy of the prompt and all of its switches and options is now stored in the corresponding image in a tEXt metadata field named "Dream". You can read the prompt using scripts/images2prompt.py, or an image editor that allows you to explore the full metadata. - **Please run "conda env update -f environment.yaml" to load the k_lms dependencies!!** + **Please run "conda env update" to load the k_lms dependencies!!** --- ## v1.01 (21 August 2022) - added k_lms sampling. - **Please run "conda env update -f environment.yaml" to load the k_lms dependencies!!** + **Please run "conda env update" to load the k_lms dependencies!!** - use half precision arithmetic by default, resulting in faster execution and lower memory requirements Pass argument --full_precision to dream.py to get slower but more accurate image generation diff --git a/docs/README-CompViz.md b/docs/README-CompViz.md index ed7df6a4ea..4780bfeaa4 100644 --- a/docs/README-CompViz.md +++ b/docs/README-CompViz.md @@ -28,7 +28,7 @@ A suitable [conda](https://conda.io/) environment named `ldm` can be created and activated with: ``` -conda env create -f environment.yaml +conda env create conda activate ldm ``` diff --git a/docs/features/UPSCALE.md b/docs/features/UPSCALE.md index 381d2b90ec..d549eff443 100644 --- a/docs/features/UPSCALE.md +++ b/docs/features/UPSCALE.md @@ -3,7 +3,7 @@ The script also provides the ability to do face restoration and upscaling with the help of GFPGAN and Real-ESRGAN respectively. -As of version 1.14, environment.yaml will install the Real-ESRGAN package into the +As of version 1.14, environment.yml will install the Real-ESRGAN package into the standard install location for python packages, and will put GFPGAN into a subdirectory of "src" in the stable-diffusion directory. (The reason for this is that the standard GFPGAN distribution has a minor bug that adversely affects image diff --git a/docs/help/TROUBLESHOOT.md b/docs/help/TROUBLESHOOT.md index cac5dddf23..a9e819dd7d 100644 --- a/docs/help/TROUBLESHOOT.md +++ b/docs/help/TROUBLESHOOT.md @@ -7,7 +7,7 @@ install process. **QUESTION** -During `conda env create -f environment.yaml`, conda hangs indefinitely. +During `conda env create`, conda hangs indefinitely. **SOLUTION** @@ -31,7 +31,7 @@ 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 +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. --- @@ -46,7 +46,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 `pip install -e .` and/or `conda env update -f environment.yaml` (These commands won't break anything.) +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.) **Sub Branch** diff --git a/docs/installation/INSTALL_LINUX.md b/docs/installation/INSTALL_LINUX.md index 2a64f1eb41..9e7df04663 100644 --- a/docs/installation/INSTALL_LINUX.md +++ b/docs/installation/INSTALL_LINUX.md @@ -34,7 +34,7 @@ This will create InvokeAI folder where you will follow the rest of the steps. 5. Use anaconda to copy necessary python packages, create a new python environment named `ldm` and activate the environment. ``` -(base) ~/InvokeAI$ conda env create -f environment.yaml +(base) ~/InvokeAI$ conda env create (base) ~/InvokeAI$ conda activate ldm (ldm) ~/InvokeAI$ ``` diff --git a/docs/installation/INSTALL_MAC.md b/docs/installation/INSTALL_MAC.md index c000e818bb..29687f6736 100644 --- a/docs/installation/INSTALL_MAC.md +++ b/docs/installation/INSTALL_MAC.md @@ -76,7 +76,7 @@ PATH_TO_CKPT="$HOME/Downloads" # or wherever you saved sd-v1-4.ckpt ln -s "$PATH_TO_CKPT/sd-v1-4.ckpt" models/ldm/stable-diffusion-v1/model.ckpt # install packages -PIP_EXISTS_ACTION=w CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac.yaml +PIP_EXISTS_ACTION=w CONDA_SUBDIR=osx-arm64 conda env create -f environment-mac.yml conda activate ldm # only need to do this once @@ -93,7 +93,7 @@ python scripts/orig_scripts/txt2img.py --prompt "a photograph of an astronaut ri ``` Note, `export PIP_EXISTS_ACTION=w` is a precaution to fix `conda env -create -f environment-mac.yaml` never finishing in some situations. So +create -f environment-mac.yml` never finishing in some situations. So it isn't required but wont hurt. After you follow all the instructions and run dream.py you might get several errors. Here's the errors I've seen and found solutions for. @@ -112,7 +112,7 @@ One debugging step is to update to the latest version of PyTorch nightly. conda install pytorch torchvision torchaudio -c pytorch-nightly -If `conda env create -f environment-mac.yaml` takes forever run this. +If `conda env create -f environment-mac.yml` takes forever run this. git clean -f @@ -140,7 +140,7 @@ Third, if it says you're missing taming you need to rebuild your virtual environment. conda env remove -n ldm - conda env create -f environment-mac.yaml + conda env create -f environment-mac.yml Fourth, If you have activated the ldm virtual environment and tried rebuilding it, maybe the problem could be that I have something installed that you don't and you'll just need to manually install it. Make sure you activate the virtual environment so it installs there instead of globally. @@ -239,7 +239,7 @@ Example error. NotImplementedError: The operator 'aten::_index_put_impl_' is not current implemented for the MPS device. If you want this op to be added in priority during the prototype phase of this feature, please comment on [https://github.com/pytorch/pytorch/issues/77764](https://github.com/pytorch/pytorch/issues/77764). As a temporary fix, you can set the environment variable `PYTORCH_ENABLE_MPS_FALLBACK=1` to use the CPU as a fallback for this op. WARNING: this will be slower than running natively on MPS. ``` -The lstein branch includes this fix in [environment-mac.yaml](https://github.com/lstein/stable-diffusion/blob/main/environment-mac.yaml). +The lstein branch includes this fix in [environment-mac.yml](https://github.com/lstein/stable-diffusion/blob/main/environment-mac.yml). ### "Could not build wheels for tokenizers" diff --git a/docs/installation/INSTALL_WINDOWS.md b/docs/installation/INSTALL_WINDOWS.md index a6a733e8b5..439e3a7e79 100644 --- a/docs/installation/INSTALL_WINDOWS.md +++ b/docs/installation/INSTALL_WINDOWS.md @@ -47,8 +47,8 @@ cd InvokeAI 6. Run the following two commands: ``` -conda env create -f environment.yaml (step 6a) -conda activate ldm (step 6b) +conda env create (step 6a) +conda activate ldm (step 6b) ``` This will install all python requirements and activate the "ldm" @@ -106,7 +106,7 @@ This distribution is changing rapidly. If you used the `git clone` method (step ``` git pull -conda env update -f environment.yaml +conda env update ``` This will bring your local copy into sync with the remote one. diff --git a/environment-mac.yaml b/environment-mac.yml similarity index 96% rename from environment-mac.yaml rename to environment-mac.yml index 8067c712ee..f5fa542461 100644 --- a/environment-mac.yaml +++ b/environment-mac.yml @@ -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 diff --git a/environment.yaml b/environment.yml similarity index 100% rename from environment.yaml rename to environment.yml