🖼️
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

Generating an Image

Text to image generation

PreviousInstallationNextUsing demo colabs

Last updated 3 years ago

For the pixray module, the simplest case for generation looks like this:

import pixray
pixray.reset_settings()
pixray.add_settings(prompts="hellfire burning")
settings = pixray.apply_settings()
pixray.do_init(settings)
pixray.do_run(settings)

Now, what did the code do?

The first line imported pixray, which was added to the system path previously during installation.

Then, it reset its settings, clearing any previous settings, if any.

Then, through the pixray.add_settings() method, we can pass in arguments that pixray can use to guide and specify how to generate those images. More possible arguments and how to use them, as well as its purpose and effect can be found in

We generate all settings, including defaults, in a namespace, which can be saved and used to initialize pixray again. (WARNING: this actually does not do this, and apply_settings actually modifies globals oof ouch)

Now with settings, we can initialize pixray's session (global) settings, and run pixray based on them.

By default, the WxH for an image is 384x208, and it runs for 250 iterations on VQGAN. Expected output may look like this:

Docs