Skip to main content

Create with AI models

Project description

Peacasso

Peacasso is a UI tool to help you generate art (and experiment) with multimodal (text, image) AI models (stable diffusion).

Requirements and Installation

  • Step 1: HuggingFace Access Get access Acccess to the diffusion model weights needs a HuggingFace model account and access token. Please create an account at huggingface.co, get an access token and agree to the model terms here. Next, create a HF_API_TOKEN environment variable containing your token.
  • Step 2: Verify Environment - Pythong 3.7+ and CUDA Setup and verify that your python environment is python 3.9 or higher (preferably, use Conda). Also verify that you have CUDA installed correctly (torch.cuda.is_available() is true) and your GPU has about 7GB of VRAM memory.

Once requirements are met, run the following command to install the library:

pip install peacasso

Usage - UI and Python API

You can use the library from the ui by running the following command:

peacasso ui   # or peacasso ui --port=8080
import os
from dotenv import load_dotenv
from peacasso.generator import PromptGenerator
from peacasso.datamodel import PromptConfig

# load token from .env file
load_dotenv()

token = os.environ.get("HF_API_TOKEN")
gen = PromptGenerator(token=token)
prompt = "A sea lion wandering the streets of post apocalyptic London"

prompt_config = PromptConfig(
    prompt=prompt,
    num_images=3,
    width=512,
    height=512,
    guidance_scale=7.5,
    num_inference_steps=50,
)

result = gen.generate(prompt_config)
for i, image in enumerate(result["images"]):
    image.save(f"image_{i}.png")

Features and Road Map

  • Command line interface
  • UI Features. Query models with multiple parametrs
    • Text prompting
    • Image based prompting
    • Image inpainting (masking)
    • Latent space exploration
  • Curation/sharing experiment results

Acknowledgement

This work builds on the stable diffusion model and code is adapted from the HuggingFace implementation.

Please abide by the - CreativeML Open RAIL-M license associated with the stable diffusion model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Peacasso-0.0.6a0.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Peacasso-0.0.6a0-py3-none-any.whl (3.6 MB view details)

Uploaded Python 3

File details

Details for the file Peacasso-0.0.6a0.tar.gz.

File metadata

  • Download URL: Peacasso-0.0.6a0.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for Peacasso-0.0.6a0.tar.gz
Algorithm Hash digest
SHA256 9d11d08796270066b7752ac975954e59a94c2d34f70ca24855fe9f85456bd9a0
MD5 7b4782e8d3c5e9bdf75a5e206310e334
BLAKE2b-256 7dcd3ee1e775b5b582ec0808f304c02d576df38bebf8c87fe67c4a82323382e6

See more details on using hashes here.

File details

Details for the file Peacasso-0.0.6a0-py3-none-any.whl.

File metadata

  • Download URL: Peacasso-0.0.6a0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for Peacasso-0.0.6a0-py3-none-any.whl
Algorithm Hash digest
SHA256 02250e60e16fc17cf9223e1c24c9a95879d40539b09f9211b77e5166533ac577
MD5 137aa1aa9f6b88a293d365c1d025b177
BLAKE2b-256 1471a00106201673bb58bb6e638b3a69a76a3113881c254a314357bdba318a51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page