From 9b28c65e4b0526956fd90ad86e2118536e4eaa9b Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 12 Sep 2022 18:10:27 -0400 Subject: [PATCH 1/4] revert inadvertent change of conda env name (#528) --- environment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yaml b/environment.yaml index db754a9185..30920eee9a 100644 --- a/environment.yaml +++ b/environment.yaml @@ -1,4 +1,4 @@ -name: sd-ldm +name: ldm channels: - pytorch - defaults From 10c51b4f35bb3249953d644c97d9ba939783d4d7 Mon Sep 17 00:00:00 2001 From: Andre LaBranche Date: Tue, 13 Sep 2022 12:13:47 -0700 Subject: [PATCH 2/4] Minor cleanup and re-arranging of PATH docs (#533) * slightly more consistent in how the different scenarios are described * moved the stuff about `/usr/bin/python` to be adjacent to the stuff about `/usr/bin/python3` * added an example of the 'option 1' goal state * described a way to directly answer the question: how many snakes are living in your computer? --- docs/installation/INSTALL_MAC.md | 49 +++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/docs/installation/INSTALL_MAC.md b/docs/installation/INSTALL_MAC.md index 6f3a137efb..c000e818bb 100644 --- a/docs/installation/INSTALL_MAC.md +++ b/docs/installation/INSTALL_MAC.md @@ -152,21 +152,27 @@ You might also need to install Rust (I mention this again below). ### How many snakes are living in your computer? -Here's the reason why you have to specify which python to use. -There are several versions of python on macOS and the computer is -picking the wrong one. More specifically, preload_models.py and dream.py says to -find the first `python3` in the path environment variable. You can see which one -it is picking with `which python3`. These are the mostly likely paths you'll see. +You might have multiple Python installations on your system, in which case it's +important to be explicit and consistent about which one to use for a given project. +This is because virtual environments are coupled to the Python that created it (and all +the associated 'system-level' modules). + +When you run `python` or `python3`, your shell searches the colon-delimited locations +in the `PATH` environment variable (`echo $PATH` to see that list) in that order - first match wins. +You can ask for the location of the first `python3` found in your `PATH` with the `which` command like this: % which python3 /usr/bin/python3 -The above path is part of the OS. However, that path is a stub that asks you if -you want to install Xcode. If you have Xcode installed already, -/usr/bin/python3 will execute /Library/Developer/CommandLineTools/usr/bin/python3 or -/Applications/Xcode.app/Contents/Developer/usr/bin/python3 (depending on which +Anything in `/usr/bin` is [part of the OS](https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW6). However, `/usr/bin/python3` is not actually python3, but +rather a stub that offers to install Xcode (which includes python 3). If you have Xcode installed already, +`/usr/bin/python3` will execute `/Library/Developer/CommandLineTools/usr/bin/python3` or +`/Applications/Xcode.app/Contents/Developer/usr/bin/python3` (depending on which Xcode you've selected with `xcode-select`). +Note that `/usr/bin/python` is an entirely different python - specifically, python 2. Note: starting in +macOS 12.3, `/usr/bin/python` no longer exists. + % which python3 /opt/homebrew/bin/python3 @@ -176,17 +182,21 @@ for Homebrew binaries before system ones, you'll see the above path. % which python /opt/anaconda3/bin/python -If you drop the "3" you get an entirely different python. Note: starting in -macOS 12.3, /usr/bin/python no longer exists (it was python 2 anyway). - -If you have Anaconda installed, this is what you'll see. There is a -/opt/anaconda3/bin/python3 also. +If you have Anaconda installed, you will see the above path. There is a +`/opt/anaconda3/bin/python3` also. We expect that `/opt/anaconda3/bin/python` +and `/opt/anaconda3/bin/python3` should actually be the *same python*, which you can +verify by comparing the output of `python3 -V` and `python -V`. (ldm) % which python /Users/name/miniforge3/envs/ldm/bin/python -This is what you'll see if you have miniforge and you've correctly activated -the ldm environment. This is the goal. +The above is what you'll see if you have miniforge and you've correctly activated +the ldm environment, and you used option 2 in the setup instructions above ("no pyenv"). + + (anaconda3-2022.05) % which python + /Users/name/.pyenv/shims/python + +... and the above is what you'll see if you used option 1 ("Alongside pyenv"). It's all a mess and you should know [how to modify the path environment variable](https://support.apple.com/guide/terminal/use-environment-variables-apd382cc5fa-4f58-4449-b20a-41c53c006f8f/mac) if you want to fix it. Here's a brief hint of all the ways you can modify it @@ -201,6 +211,13 @@ if you want to fix it. Here's a brief hint of all the ways you can modify it Which one you use will depend on what you have installed except putting a file in /etc/paths.d is what I prefer to do. +Finally, to answer the question posed by this section's title, it may help to list +all of the `python` / `python3` things found in `$PATH` instead of just the one that +will be executed by default. To do that, add the `-a` switch to `which`: + + % which -a python3 + ... + ### Debugging? Tired of waiting for your renders to finish before you can see if it From 89da371f4841f7e05da5a1672459d700c3920784 Mon Sep 17 00:00:00 2001 From: David Wager Date: Tue, 13 Sep 2022 20:17:26 +0100 Subject: [PATCH 3/4] Fix images in Variations example (#537) Images had their relative paths broken. Adjust paths. --- docs/features/VARIATIONS.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/features/VARIATIONS.md b/docs/features/VARIATIONS.md index c1798ae759..a6c5c936c1 100644 --- a/docs/features/VARIATIONS.md +++ b/docs/features/VARIATIONS.md @@ -36,7 +36,7 @@ Outputs: The one with seed 3357757885 looks nice: - + --- @@ -65,8 +65,8 @@ variation amount used to generate it. This gives us a series of closely-related variations, including the two shown here. - - + + I like the expression on Xena's face in the first one (subseed 3647897225), and the armor on her shoulder in the second one (subseed 1614299449). Can we combine them to get the best of both worlds? @@ -81,7 +81,7 @@ Outputs: Here we are providing equal weights (0.1 and 0.1) for both the subseeds. The resulting image is close, but not exactly what I wanted: - + We could either try combining the images with different weights, or we can generate more variations around the almost-but-not-quite image. We do the latter, using both the `-V` (combining) and `-v` (variation strength) options. Note that we use `-n6` to generate 6 variations: @@ -98,7 +98,7 @@ Outputs: This produces six images, all slight variations on the combination of the chosen two images. Here's the one I like best: - + As you can see, this is a very powerful tool, which when combined with subprompt weighting, gives you great control over the content and quality of your generated images. From b02ea331dfba1597225ce690205a140287aa35a5 Mon Sep 17 00:00:00 2001 From: Robert Bolender Date: Wed, 14 Sep 2022 06:47:17 -0700 Subject: [PATCH 4/4] Clarify behavior of -v and -n parameters (#551) Fixes https://github.com/lstein/stable-diffusion/issues/544 --- docs/features/IMG2IMG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/IMG2IMG.md b/docs/features/IMG2IMG.md index ac560f6984..3930208e62 100644 --- a/docs/features/IMG2IMG.md +++ b/docs/features/IMG2IMG.md @@ -16,7 +16,7 @@ modified, ranging from `0.0` (keep the original intact), to `1.0` (ignore the original completely). The default is `0.75`, and ranges from `0.25-0.75` give interesting results. -You may also pass a `-v` option to generate count variants on +You may also pass a `-v` option to generate `-n` count variants on the original image. This is done by passing the first generated image back into img2img the requested number of times. It generates interesting variants.