/opt/homebrew/bin/python3 -m venv venv # [1, 2]
venv/bin/python -m pip install -r requirements.txt # [3]
venv/bin/python scripts/txt2img.py ...
1. Using /opt/homebrew/bin/python3 allows you to remove the suggestion about "You might need to reopen your console to make it work" and ensures folks are using the just installed via homebrew python3, as opposed to Apple's /usr/bin/python3 which is currently 3.8. It also works regardless of the user's PATH. We can be fairly confident /opt/homebrew/bin is correct since that's the standard homebrew location on Apple Silicon and folks who've installed it elsewhere will likely know how to modify the instructions.2. No need to install virtualenv since Python 3.6 which ships with a built-in venv module which covers most use cases.
3. No need to source an activate script. Call the python inside the virtual environment and it will use the virtual environment's packages.