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
- 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. Finally, create a
HF_API_TOKENenvironment variable containing your token. - This library requires
python 3.9or higher. - Requires a GPU (6 GB of VRAM) with CUDA support.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Peacasso-0.0.5a0.tar.gz.
File metadata
- Download URL: Peacasso-0.0.5a0.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ac1f7996ed16dbc7ecefe4eef821968290dbadbdbc38c49820f0801320200fa
|
|
| MD5 |
d76ebc7d75459ab39980d12598a79574
|
|
| BLAKE2b-256 |
d74bc6bb1cc19310ec3403c6375ebb08a5de277ff60e0ba6355a91ada5fdb877
|
File details
Details for the file Peacasso-0.0.5a0-py3-none-any.whl.
File metadata
- Download URL: Peacasso-0.0.5a0-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b453981386f4c829045a20e356c994f16c48ec950f16de52dee808d48973081a
|
|
| MD5 |
7a80a5e85a98e11ce4d5a29122e02b61
|
|
| BLAKE2b-256 |
89e934f4ed69cc8ff9786b0280ad4829b5052b434dda4c7a1f364f720a78dcba
|