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.1.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.1-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dalle_generator-25.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 85ecd82cd425e14621cf2291d4693493271c7508a55c13017c836f3b433f14dc
MD5 e73a2bb8bc42d386b4a8a07b3262283f
BLAKE2b-256 75b60388ca3de11da9368e067b6a24d9d54504a9ba5ba420d919bf3f15743ce5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dalle_generator-25.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fce375f5ef36dce8fcc334a7953c1e919271c2daf2534dc78815a9bf8869650
MD5 5cc52843c9c8f3b9b9d9b629b7a89e29
BLAKE2b-256 e40ef5838f54daaa030d2da58e5e05e306424baeee2b58f0b07a3738b5d99dbd

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