Installing & running cene's imagen-pytorch
Install Anaconda via command-line arm64 installer
conda update -n base -c defaults conda
conda create -n torch-nightly python=3.9
pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
conda config --set auto_activate_base false
echo 'conda activate torch-nightly' >> ~/.zshrc
# now open a new shell, or source your zshrc in this shell
# I used Conda
brew install git-lfs
git lfs install
git clone https://huggingface.co/Cene655/ImagenT5-3B
git clone https://github.com/xinntao/Real-ESRGAN.git
python3 -m venv venv
source ./venv/bin/activate
python3 -m pip install --upgrade pip
pip install wheel
pip install .
pip install git+https://github.com/openai/CLIP.git
pip install basicsr
pip install facexlib
# install my fork of Real-ESRGAN which uses recent numpy, otherwise you'll be forced to build-from-source
pip install git+https://github.com/Birch-san/GFPGAN.git@newer-numpy
cd Real-ESRGAN
pip install -r requirements.txt
python setup.py develop
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P experiments/pretrained_models
cd ..
pip install ipython
# our torch nightly probably got nuked by the above. install a pre-release to get GPU support on macOS
# it's fiddly finding mutually-compatible prereleases of torchvision and torch. here's a known-good pair I found.
# by the time you execute these instructions, these will **not** be the latest nightlies of torch or torchvision.
pip install --pre "torch==1.13.0.dev20220610" "torchvision==0.14.0.dev20220609" "torchaudio>0.12.0.dev0" --extra-index-url https://download.pytorch.org/whl/nightly/cpu
wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth
Create run.py
in the root of the imagen-pytorch repository, then invoke like so:
PYTORCH_ENABLE_MPS_FALLBACK=1 python run.py