Add your description here
Project description
Dynamic Prompts Image Generator
This application integrates the dynamicprompts library with a Gradio UI to generate images with sequential artist cycling and random general/elements.
Features
- Sequential artist switching (cyclical sampler)
- Random general and elements selection
- Custom save location for generated images
- Easy-to-use Gradio interface
How It Works
The application uses the dynamicprompts library to handle prompt generation with different sampling methods:
- Sequential Artist Switching: Uses the cyclical sampler (
@) to cycle through artists one by one - Random General and Elements: Uses the default random sampler to randomly select from general and element options
For example, when you provide a template like:
A painting by {artist}, {landscape|portrait|still life}, {vibrant colors|muted tones|black and white}
The application will:
- Replace
{artist}with{@artist1|artist2|artist3}(using the cyclical sampler) - Leave the other variant groups with random sampling
- Generate images with sequential artists and random general/elements
Installation
- Clone this repository:
- Install dependencies:
pip install -r requirements.txt
Usage
-
Run the application:
python app.py -
Access the UI in your browser (typically at http://127.0.0.1:7860)
-
Enter the following information:
- API URL and API Key for your image generation service
- Model name
- List of artists (one per line)
- Prompt template with
{artist}placeholder and variant options - Save location for generated images
- Number of images to generate
-
Click "Generate Images" to start the generation process
Example
Artist List:
Vincent van Gogh
Claude Monet
Salvador Dali
Prompt Template:
A painting by {artist}, {landscape|portrait|still life}, {vibrant colors|muted tones|black and white}
This will generate sequential images with:
- "A painting by Vincent van Gogh, [random selection], [random selection]"
- "A painting by Claude Monet, [random selection], [random selection]"
- "A painting by Salvador Dali, [random selection], [random selection]"
- "A painting by Vincent van Gogh, [random selection], [random selection]"
- And so on...
Notes
To build wheels manually, run the following commands:
python -m pip install build twine
python -m build
twine check dist/*
twine upload dist/*
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 nai_generate-0.1.0.tar.gz.
File metadata
- Download URL: nai_generate-0.1.0.tar.gz
- Upload date:
- Size: 77.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5cb878d362111fa0fc0da78eda7a6bb406a5aeccd4a676dbef0a3d2c0467f9
|
|
| MD5 |
0f801a5bd62b5bb0b7e4a5e9df72f82f
|
|
| BLAKE2b-256 |
1cdb51fba700cbcd6def4e82d0e12857b1f781de55e877623d18763488a85ba1
|
File details
Details for the file nai_generate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nai_generate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11a506879577c8b6882dcb621a1a516df6539ce02c0fbf783379af777d7ccc36
|
|
| MD5 |
019ebccbeb0ba229cb64951654bc77b8
|
|
| BLAKE2b-256 |
6b3ba3c2093f498825881bd4d81cbb758265eaa38227e6a0f201246eba7a288f
|