🖼️
Pixray
  • Docs for Pixray
  • Introduction
    • Introduction to Pixray
  • Quickstart
    • Installation
    • Generating an Image
    • Using demo colabs
    • Generating online (without installation)
    • FAQ
  • Docs
    • Primary settings
    • Fine settings
    • Image control settings
    • Drawer Settings
    • Misc/Display settings
    • Losses
    • Functional video movements
    • Image filters
  • Tutorial
    • Changing drawers
    • Changing primary settings
    • Guiding output with prompts
    • Guiding output with images
    • Guiding output with losses
    • Guiding output with image filters (ColorMapper)
    • Making a video using generation frames
    • Making a video using functional movements
    • Making a video using different prompts (story mode)
    • Working with weaker machines
  • Advanced
    • Empirical testing - comparing output quality
    • Developing a custom loss
    • Developing a custom drawer
    • Developing a custom image filter
    • Developing a function video movement
    • Modifying Pixray
  • Future
    • make Image Filter subclass - colormapper as subclass
    • Guide video (move/story) within pixray
    • Batch run for images and video
Powered by GitBook
On this page
  1. Quickstart

Installation

How to install pixray

These snippets are applicable for Colab users that cannot access the command line.

!git clone https://github.com/pixray/pixray
%cd pixray
!pip install -r requirements.txt
!git clone https://github.com/pixray/v-diffusion-pytorch
!cp -r v-diffusion-pytorch/diffusion pixray/.
!git clone https://github.com/pixray/diffvg && cd diffvg && git submodule update --init --recursive && python setup.py 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
sys.path.append("pixray")

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 https://github.com/pixray/pixray
  !pip install -r pixray/requirements.txt
  !rm -Rf v-diffusion-pytorch
  !git clone https://github.com/pixray/v-diffusion-pytorch
  # not sure why this setup hack is necessary
  !cp -r v-diffusion-pytorch/diffusion pixray/.
  !pip uninstall -y tensorflow 
  !git clone https://github.com/pixray/diffvg
  %cd diffvg
  !git submodule update --init --recursive
  !python setup.py install
  %cd ..
  !pip freeze | grep torch
import os
if not os.path.isfile("first_init_complete"):
  !mkdir -p models
  os.mknod("first_init_complete")

This is the basic setup for pixray

git clone https://github.com/pixray/pixray
cd pixray
pip install -r requirements.txt
git clone https://github.com/pixray/v-diffusion-pytorch
cp -r v-diffusion-pytorch/diffusion pixray/.
git clone https://github.com/pixray/diffvg 
cd diffvg 
git submodule update --init --recursive 
python setup.py install 
cd ...
mkdir models

Note: if diffvg is not installed, pixray can still be used for vqgan generation

PreviousIntroduction to PixrayNextGenerating an Image

Last updated 3 years ago

Note: pixray works well with 16GB RAM, working with less RAM is fine, but see for detailed solutions.

Working with weaker machines