Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Conversation

@AgI-Dev-Official
Copy link

The original setup script is for bash and causes some error when run the script via source setup_mac.sh in zsh.
The –p option doesn’t mean the same thing to bash’s read command and zsh's read command.

setup_mac_zsh.sh Outdated
Comment on lines 97 to 102

# In order for the requirements.txt packages to install correctly, functorch needs to be installed already.
# functorch will not successfully build without torch, but also won't build under the nightly build we use.
pip install torch==1.12.1
pip install git+https://github.com/pytorch/functorch@a6e0e61242d2ed10287965c3febc426fd6abf5f9

Copy link
Collaborator

@brkirch brkirch Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines are no longer needed and can be removed, functorch is no longer listed as a requirement.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'd already delete related code.

setup_mac_zsh.sh Outdated
Comment on lines 147 to 171
python webui.py --precision full --no-half --opt-split-attention-v1 --use-cpu GFPGAN CodeFormer BSRGAN ESRGAN SCUNet
# Deactivate conda environment
conda deactivate
" > run_webui_mac.sh

# Give run permissions to the shell script
chmod +x run_webui_mac.sh

echo "============================================="
echo "============================================="
echo "==============MORE INFORMATION==============="
echo "============================================="
echo "============================================="
echo "If you want to run the web UI again, you can run the following command:"
echo "./stable-diffusion-webui/run_webui_mac.sh"
echo "or"
echo "cd stable-diffusion-webui && ./run_webui_mac.sh"
echo "============================================="
echo "============================================="
echo "============================================="
echo "============================================="


# Run the web UI
python webui.py --precision full --no-half --opt-split-attention-v1 --use-cpu GFPGAN CodeFormer BSRGAN ESRGAN SCUNet
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can now remove --opt-split-attention-v1 from both python webui.py --precision full --no-half --opt-split-attention-v1 --use-cpu GFPGAN CodeFormer BSRGAN ESRGAN SCUNet so that the new default, InvokeAI's split attention, gets used. InvokeAI's split attention gives ~30% better performance.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic Improvement. Thank for informing me to update.

@dylancl
Copy link
Owner

dylancl commented Oct 12, 2022

Is there any specific reason why you'd want to run it using source instead of just as an executable in a new shell with ./ ?

@AgI-Dev-Official
Copy link
Author

Is there any specific reason why you'd want to run it using source instead of just as an executable in a new shell with ./ ?

@dylancl This is because that conda activate env do not work in shell script even when call conda init first. When run a shell script, it normally does not source .bashrc/.zshrc. I am not sure why ./filename command do not work well in my shell even though it would be same as sh filename, maybe there are some problems in environment variables.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants