Skip to main content

Automated testing for the DeepAI text to image api

Project description

deepimg3

deepimg3 is a Python module designed for automated testing of the DeepAI Text-to-Image API. It allows users to asynchronously and efficiently generate batches of images based on specified sets of prompts, managing the process through command-line arguments. The tool supports selecting image quality levels and managing multiple prompts through JSON configuration files.

Prerequisites

Installation

Download the latest .whl file from the project repository and install it using pip:

pip install deepimg3

Usage

After installation, you can run the module from the command line:

python -m deepimg3 --help

This will display help information about all available command-line options:

Usage: __main__.py [-h] [-n NUM] [-p PROMPTS] [-q {both,hd,sd}] [-c CONCURRENCY]

Generate images based on command line arguments.

options:
  -h, --help            show this help message and exit
  -n NUM, --num NUM     Number of images to generate for each prompt/quality
  -p PROMPTS, --prompts PROMPTS
                        File path to the promptsets file. (JSON)
  -q {both,hd,sd}, --quality {both,hd,sd}
                        Quality of the image to generate.
  -c CONCURRENCY, --concurrency CONCURRENCY
                        Number of concurrent image generation tasks to run. Default: 4

Examples

Run the tool to generate images using the default promptsets.json:

python -m deepimg3 --prompts promptset.example.json --num 2 --quality hd

This command will generate 2 HD images per prompt found in promptsets.example.json.

Configuration

See promptsets.example.json for an example of how to format this file.

Development

If you want to contribute to deepimg3, you can clone the repository and install the dependencies as follows:

git clone https://github.com/DJStompZone/deepimg3.git
cd deepimg3
poetry install

Make sure you have Poetry installed to manage dependencies.

License

This project is licensed under the MIT License - see the LICENSE file 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

deepimg3-1.4.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

deepimg3-1.4.1-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file deepimg3-1.4.1.tar.gz.

File metadata

  • Download URL: deepimg3-1.4.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/10

File hashes

Hashes for deepimg3-1.4.1.tar.gz
Algorithm Hash digest
SHA256 168b8bb1a7082366b3c60a700815e761eea54565f09c8fe85a6ecc5a1e4f8dfc
MD5 63e5197e9db9be09dbf9bfdf26536642
BLAKE2b-256 fb5ee1ede7aae47fc955fa3153c9289ddf960fcc1ccf4ea6715a751f2b760aa0

See more details on using hashes here.

File details

Details for the file deepimg3-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: deepimg3-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.0 Windows/10

File hashes

Hashes for deepimg3-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c80bb1ef4eff4ebbccb2b4b3ff0541ebcd66c3960d4a65ce6ae2a9fc81146b60
MD5 a46ce94046641d2348f745e8bac9290d
BLAKE2b-256 152a5c2a25fd94911d98bd3fa69f2c02ffc6887d0a2067a21ace5c091853beab

See more details on using hashes here.

Supported by

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