aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-19 12:50:49 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-19 12:50:49 +0000
commit0e47c36a28ba638855d323409b5073660de14136 (patch)
tree30b0022f31198f1e9cc146d79d25f8340a726eea
parent05ccb4d0e3ff38503a2863889e21290e77590ee2 (diff)
parent4334d25978ded517a76359e9e92b8101610cc35f (diff)
downloadstable-diffusion-webui-gfx803-0e47c36a28ba638855d323409b5073660de14136.tar.gz
stable-diffusion-webui-gfx803-0e47c36a28ba638855d323409b5073660de14136.tar.bz2
stable-diffusion-webui-gfx803-0e47c36a28ba638855d323409b5073660de14136.zip
Merge branch 'dev' into release_candidate
-rw-r--r--modules/processing.py2
-rwxr-xr-xwebui.sh15
2 files changed, 12 insertions, 5 deletions
diff --git a/modules/processing.py b/modules/processing.py
index 179ca6ac..e028bf9e 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -1029,7 +1029,7 @@ class StableDiffusionProcessingTxt2Img(StableDiffusionProcessing):
image = sd_samplers.sample_to_image(image, index, approximation=0)
info = create_infotext(self, self.all_prompts, self.all_seeds, self.all_subseeds, [], iteration=self.iteration, position_in_batch=index)
- images.save_image(image, self.outpath_samples, "", seeds[index], prompts[index], opts.samples_format, info=info, suffix="-before-highres-fix")
+ images.save_image(image, self.outpath_samples, "", seeds[index], prompts[index], opts.samples_format, info=info, p=self, suffix="-before-highres-fix")
if latent_scale_mode is not None:
for i in range(samples.shape[0]):
diff --git a/webui.sh b/webui.sh
index a683d946..cb8b9d14 100755
--- a/webui.sh
+++ b/webui.sh
@@ -4,8 +4,15 @@
# change the variables in webui-user.sh instead #
#################################################
+
+use_venv=1
+if [[ $venv_dir == "-" ]]; then
+ use_venv=0
+fi
+
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
+
# If run from macOS, load defaults from webui-macos-env.sh
if [[ "$OSTYPE" == "darwin"* ]]; then
if [[ -f "$SCRIPT_DIR"/webui-macos-env.sh ]]
@@ -47,7 +54,7 @@ then
fi
# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
-if [[ -z "${venv_dir}" ]]
+if [[ -z "${venv_dir}" ]] && [[ $use_venv -eq 1 ]]
then
venv_dir="venv"
fi
@@ -164,7 +171,7 @@ do
fi
done
-if ! "${python_cmd}" -c "import venv" &>/dev/null
+if [[ $use_venv -eq 1 ]] && ! "${python_cmd}" -c "import venv" &>/dev/null
then
printf "\n%s\n" "${delimiter}"
printf "\e[1m\e[31mERROR: python3-venv is not installed, aborting...\e[0m"
@@ -184,7 +191,7 @@ else
cd "${clone_dir}"/ || { printf "\e[1m\e[31mERROR: Can't cd to %s/%s/, aborting...\e[0m" "${install_dir}" "${clone_dir}"; exit 1; }
fi
-if [[ -z "${VIRTUAL_ENV}" ]];
+if [[ $use_venv -eq 1 ]] && [[ -z "${VIRTUAL_ENV}" ]];
then
printf "\n%s\n" "${delimiter}"
printf "Create and activate python venv"
@@ -207,7 +214,7 @@ then
fi
else
printf "\n%s\n" "${delimiter}"
- printf "python venv already activate: ${VIRTUAL_ENV}"
+ printf "python venv already activate or run without venv: ${VIRTUAL_ENV}"
printf "\n%s\n" "${delimiter}"
fi