How to install pixray
These snippets are applicable for Colab users that cannot access the command line.
!git clone
%cd pixray
!pip install -r requirements.txt
!git clone
!cp -r v-diffusion-pytorch/diffusion pixray/.
!git clone && cd diffvg && git submodule update --init --recursive && python install && cd ..
Due to the nature of colab, installing these requirements in a cell requires a runtime restart to properly load all libraries and ensure that pixray runs smoothly. After installation, the cell for installation need not be run again for the rest of the session, even after more runtime restarts.
After restarting every time, this line should be run to ensure that the python interpreter knows where to find the pixray module.
import sys
a simple working snippet for Colab may be: (note that pixray also needs a models directory, at the moment unfortunately)
from IPython.utils import io
with io.capture_output() as captured:
!rm -Rf pixray
!git clone
!pip install -r pixray/requirements.txt
!rm -Rf v-diffusion-pytorch
!git clone
# not sure why this setup hack is necessary
!cp -r v-diffusion-pytorch/diffusion pixray/.
!pip uninstall -y tensorflow
!git clone
%cd diffvg
!git submodule update --init --recursive
!python install
%cd ..
!pip freeze | grep torch
import os
if not os.path.isfile("first_init_complete"):
!mkdir -p models
This is the basic setup for pixray
git clone
cd pixray
pip install -r requirements.txt
git clone
cp -r v-diffusion-pytorch/diffusion pixray/.
git clone
cd diffvg
git submodule update --init --recursive
python install
cd ...
mkdir models
Note: if diffvg is not installed, pixray can still be used for vqgan generation
Note: pixray works well with 16GB RAM, working with less RAM is fine, but see Working with weaker machines for detailed solutions.
Copy link