Skip to content

Commit

Permalink
increment to 0.3.1, add mmimpose install to script
Browse files Browse the repository at this point in the history
  • Loading branch information
painebenjamin committed Nov 23, 2023
1 parent b5646e4 commit a6f2026
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 9 deletions.
28 changes: 26 additions & 2 deletions enfugue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,21 @@ usage() {
echo " -h Display this help message."
echo " -t <conda|portable> Automatically set installation type (do not prompt.)"
echo " -u <yes|no> Automatically apply or skip updates (do not prompt.)"
echo " -m <yes|no> Automatically install miniconda if needed (do not prompt.)"
echo " -d <directory> Automatically extract portable installation to this directory (do not prompt.)"
echo " -s <yes|no> Automatically apply or skip symlinking portable binary (do not prompt.)"
echo " -c <yes|no> Automatically install miniconda if needed. Exit if not installed and [no] passed (do not prompt.)"
echo " -m <yes|no> Automatically install or skip mmpose if needed (do not prompt.)"
}

# Declare default options, then iterate through command line arguments and set variables.
INSTALL_TYPE=""
INSTALL_MINICONDA=""
INSTALL_MMPOSE=""
INSTALL_UPDATE=""
INSTALL_DIRECTORY=""
INSTALL_SYMLINK=""

while getopts ":ht:u:i:d:s:" ARG; do
while getopts ":ht:u:i:c:m:d:s:" ARG; do
case $ARG in
t)
INSTALL_TYPE=$OPTARG
Expand All @@ -148,6 +150,10 @@ while getopts ":ht:u:i:d:s:" ARG; do
INSTALL_UPDATE=${INSTALL_UPDATE,,}
;;
m)
INSTALL_MMPOSE=${OPTARG:0:1}
INSTALL_MMPOSE=${INSTALL_MMPOSE,,}
;;
c)
INSTALL_MINICONDA=${OPTARG:0:1}
INSTALL_MINICONDA=${INSTALL_MINICONDA,,}
;;
Expand Down Expand Up @@ -344,6 +350,24 @@ if [[ "$ENFUGUE" == "" && "$ENFUGUE_SERVER" == "" ]]; then
fi
fi

# Now enfugue is installed, check if we can install MMPose
if [[ "$ENFUGUE" != "" && "$PYTHON" != "" ]]; then
MMPOSE_INSTALLED=$($PYTHON -m pip freeze | grep mmpose)
if [[ "$MMPOSE_INSTALLED" == "" && "${INSTALL_MMPOSE,,}" != 'f' && "${INSTALL_MMPOSE,,}" != 'n' ]]; then
if [[ "${INSTALL_MMPOSE,,}" != "y" && "${INSTALL_MMPOSE,,}" != "t" ]]; then
read -p "MMPose not installed. Install it? [Yes]: " INSTALL_MMPOSE
INSTALL_MMPOSE=${INSTALL_MMPOSE:-Yes}
INSTALL_MMPOSE=${INSTALL_MMPOSE:0:1}
fi
if [[ "${INSTALL_MMPOSE,,}" == "y" || "${INSTALL_MMPOSE,,}" == "t" ]]; then
$PYTHON -m mim install mmengine
$PYTHON -m mim install "mmcv>=2.0.1"
$PYTHON -m mim install "mmdet>=3.1.0"
$PYTHON -m mim install "mmpose>=1.1.0"
fi
fi
fi

# Now we should have enfugue, run it.
if [ "$ENFUGUE" != "" ]; then
# Run enfugue via python module script
Expand Down
2 changes: 1 addition & 1 deletion environments/cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dependencies:
- lycoris-lora>=1.8
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down
2 changes: 1 addition & 1 deletion environments/linux-cuda-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
- lycoris-lora>=1.8
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down
2 changes: 1 addition & 1 deletion environments/linux-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
- lycoris-lora>=1.8
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down
2 changes: 1 addition & 1 deletion environments/linux-tensorrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
- protobuf==3.20.1
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down
2 changes: 1 addition & 1 deletion environments/macos-mps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies:
- lycoris-lora>=1.8
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down
2 changes: 1 addition & 1 deletion environments/windows-cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies:
- certifi>=2023.5.7
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down
2 changes: 1 addition & 1 deletion environments/windows-tensorrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ dependencies:
- protobuf==3.20.1
- openmim>=0.3.9,<0.4
- tensorflow
- enfugue==0.3.0.post2
- enfugue==0.3.1
- git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers
- git+https://github.com/openai/CLIP.git@main#egg=clip
- git+https://github.com/CompVis/stable-diffusion.git@main#egg=latent-diffusion
Expand Down

0 comments on commit a6f2026

Please sign in to comment.