Skip to main content

A simple image generator that focuses on prompt adherence and aesthetics.

Project description

dalle-generator

An image generator that focuses on prompt adherence and unique aesthetics.

Installation

pip install dalle-generator

Key Features

  • 🎨 Image Generation
    • Text-to-Image Generation
    • Multiple Image Output
    • Smart Prompt Handling
  • 🔄 Flexible Integration
    • Interactive Web UI
    • REST API Server
    • Python Library
  • 💾 Output Management
    • Multiple Output Formats
    • Date-based Organization
    • Automatic File Naming

Usage

Python Library

from dalle_generator import DalleGenerator

# Initialize
client = DalleGenerator(
    mode="default",       # Mode (default/webui/api)
    log_on=True,          # Enable logging
    log_to=None,          # Log directory
    save_to="outputs",    # Output directory
    save_as="webp"        # Output format (webp/jpg/pil)
)

# Generate images
results = client.image_generate(
    prompt="a beautiful landscape"
)

# Returns list of file paths or PIL Images if save_as='pil'

Web UI

Start the Gradio web interface:

client = DalleGenerator(mode="webui")
# OR
client.start_webui(
    host="0.0.0.0",    # Server host
    port=5735,         # Server port
    browser=True,      # Launch browser
    upload_size="4MB", # Max upload size
    public=False,      # Enable public URL
    limit=10           # Max concurrent requests
)

REST API

Start the Flask API server:

client = DalleGenerator(mode="api")
# OR
client.start_api(
    host="0.0.0.0",    # Server host
    port=5734,         # Server port
    debug=False        # Enable debug mode
)

API Endpoints

  • POST /v1/api/image/generate

Configuration

Output Formats

  • webp - High quality, small size
  • jpg - Standard compressed
  • pil - PIL Image object

Output Structure

outputs/
└── YYYY-MM-DD/
    ├── YYYYMMDD_HHMMSS_UUID8_1.webp
    ├── YYYYMMDD_HHMMSS_UUID8_2.webp
    └── ...

License

See LICENSE for details.

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

dalle_generator-25.3.2.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

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

dalle_generator-25.3.2-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file dalle_generator-25.3.2.tar.gz.

File metadata

  • Download URL: dalle_generator-25.3.2.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.11

File hashes

Hashes for dalle_generator-25.3.2.tar.gz
Algorithm Hash digest
SHA256 3c1dd702a250e1252dbea252eb8a5b27f76f0cfe9badb9454037c368793c8388
MD5 c92907ac9a4f94fdf0525b1494084ad3
BLAKE2b-256 d2c6fb3ac5855263e9a49a3507f0e524695baefa19c1e23dff36786b6f93b74b

See more details on using hashes here.

File details

Details for the file dalle_generator-25.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dalle_generator-25.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 179d8c68a267faa2fc5e4a4b7bd26b61410043ebb73267896d8121042bd04ec0
MD5 d2a55ca2ef6da7d841bcdbcc717b668b
BLAKE2b-256 3905969c4df7330c950f7de7ef3dbd3fba74608adcac9cfa2225f19c49466ef4

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