Skip to content

About

Generate thousands of organized, production-ready images for any domain. YouTube channels · Content creators · Marketing teams · AI researchers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

⚡ ai-image-library-generator

AI Image Library Generator — Powered by ComfyUI

Generate thousands of organized, production-ready images for any domain.
YouTube channels · Content creators · Marketing teams · AI researchers

Python 3.11+ ComfyUI License: Proprietary No Redistribution

Get Started · Documentation · Examples · Buy a License

What is ai-image-library-generator?

ai-image-library-generator is a Python automation script that turns a YAML configuration file into a massive, organized image library — using your local ComfyUI instance as the engine.

Instead of clicking through a UI one image at a time, you define your content plan in a YAML file and let the batch runner do everything: pick subjects, compose prompts, generate images, upscale them, and organize the output into a clean folder structure ready for publishing.

It was originally built to power a dog training YouTube channel with 10,000+ photorealistic images. Now it's fully domain-agnostic — use it for dogs, people, food, medical illustrations, real estate, e-commerce, or anything you can describe in a prompt.

Example Generated Images

Long Format (Landscape)

Video Hd Dog Hiking Trail Golden Hour Field 004 928b379d New
Video Hd Dog Hiking Trail Golden Hour Field 004 928b379d New
Video Hd Dog Resting In Garden Golden Hour Field 004 B3e7394b New
Video Hd Dog Resting In Garden Golden Hour Field 004 B3e7394b New
Video Hd Dog Freezing Mid Stride Weight Shifted Back Full Alert Golden Hour Field 002 8d9f253c
Video Hd Dog Freezing Mid Stride Weight Shifted Back Full Alert Golden Hour Field 002 8d9f253c
Video Hd Honoring Their Service Golden Hour Field 002 Ee332d54
Video Hd Honoring Their Service Golden Hour Field 002 Ee332d54
Video Hd In The Moment Lakeside 002 0e6a82bf
Video Hd In The Moment Lakeside 002 0e6a82bf
Video Hd Preparation Sunny Park 002 E32da6d2
Video Hd Preparation Sunny Park 002 E32da6d2

Short Format (Portrait)

Shorts Anxious Fearful Dog Urban Park 004 A49d3a4c
Shorts Anxious Fearful Dog Urban Park 004 A49d3a4c
Shorts Confused Dog Expression Lakeside 001 2f08313e New
Shorts Confused Dog Expression Lakeside 001 2f08313e New
Shorts Confused Dog Expression Lakeside 002 Aa63b408 New
Shorts Confused Dog Expression Lakeside 002 Aa63b408 New
Shorts Distracted Dog Not Listening Lakeside 002 Cffc1495 New
Shorts Distracted Dog Not Listening Lakeside 002 Cffc1495 New
Shorts Distracted Dog Not Listening Mountain Meadow 002 19b7a97c New
Shorts Distracted Dog Not Listening Mountain Meadow 002 19b7a97c New
Shorts Relaxed Confident Dog Urban Park 004 901cf6f4
Shorts Relaxed Confident Dog Urban Park 004 901cf6f4
---

Who is this for?

Role Use case
YouTube creators Build a consistent visual library for thumbnails, shorts, and video covers
Content marketers Generate on-brand product and lifestyle imagery at scale
AI researchers Create structured datasets for computer vision and fine-tuning
Indie hackers Automate stock photo production for niche content sites
Agencies Produce client deliverables 10× faster with reproducible configs

Key Features

🔁 True Batch Automation

Set it running, come back to thousands of organized images. Automatic resume — interrupted runs pick up exactly where they left off.

📄 100% YAML-Driven

Every creative decision lives in a YAML file, not in the code. Change your content strategy without touching a single line of Python.

🌐 Domain-Agnostic

Ships with a library-dogs.yaml example, but works for any subject matter. Define your own subjects-*.yaml lists and negatives-*.yaml prompts for any domain.

🤖 Multi-Model Support

  • Juggernaut XL — photorealistic, fast, default
  • FLUX Schnell GGUF — maximum quality, quantized for consumer GPUs
  • SDXL Turbo — ultra-fast previews
  • RealVisXL — alternative photorealism

📐 Multi-Format Output

Generate video thumbnails (1920×1080), YouTube Shorts (1080×1920), and long-form thumbnails (1280×720) in a single run.

🔍 Built-in Audit Mode

Scan your library, see exactly which scenes are complete vs. missing images, and get copy-paste batch commands to fill the gaps overnight.

🗂️ Smart File Organization

Clean folder hierarchy: library/<category>/<subcategory>/<subject>/. New images get a _new suffix for review; approved images are clean. Integrates with the companion i-generator-review.py script.


Quick Start

# 1. Install dependencies
pip install -r requirements.txt

# 2. Configure your environment
cp defaults.yaml.example defaults.yaml
# Edit defaults.yaml with your ComfyUI path

# 3. Preview what will be generated
python i-generator-batch.py \
  --config libraries/library-dogs.yaml \
  --dry-run

# 4. Generate your first batch
python i-generator-batch.py \
  --config libraries/library-dogs.yaml \
  --categories training \
  --count 2 \
  --subject-count 3

Full installation guide (macOS, Linux, Windows + ComfyUI setup): docs/installation.md


How It Works

The script reads your YAML, resolves all combinations of topics × scenes × subjects, and submits them to ComfyUI one by one.

YAML Config
    ↓
Topic × Scene combinations
    ↓
Subject sampling (random N from your list, or full list)
    ↓
Prompt assembly: "{subject_template}, {topic prompt}, {scene setting}, photorealistic, 4k"
    ↓
ComfyUI API → Generate → Upscale → Save
    ↓
Organized folder structure with _new suffix
    ↓
i-generator-review.py → Approve (remove _new) or Delete (regenerates next run)

Output Structure

storage/library/
├── training/
│   ├── basic_commands/
│   │   ├── german_shepherd/
│   │   │   ├── video_hd_sit_command_sunny_park_001-a3f2c891_new.jpg   ← pending review
│   │   │   ├── video_hd_sit_command_sunny_park_002-b4d1e720.jpg       ← approved
│   │   └── golden_retriever/
│   └── positive_reinforcement/
└── shorts/
    └── training/
        └── basic_commands/

YAML Configuration Example

# libraries/library-dogs.yaml
meta:
  label: "Dog Training Channel"
  default_subjects: "subjects/subjects-dogs.yaml"
  default_negative: "negatives/negative-dogs.yaml"

settings:
  images_per_topic: 3
  subjects_per_topic: 5

scene_library:
  sunny_park: "sunny public park, green grass, warm midday light"
  golden_hour: "open field, golden hour warm light, soft bokeh"

categories:
  training:
    label: "Dog Training"
    subcategories:
      basic_commands:
        label: "Basic Commands"
        topics:
          - angle: "sit command"
            prompt: >
              dog sitting perfectly still, attentive expression,
              ears forward, bright eyes, calm posture
            scenes: [sunny_park, golden_hour]

CLI Reference

python i-generator-batch.py [OPTIONS]

Required:
  --config PATH           YAML library configuration file

Generation:
  --subjects PATH         YAML subjects file (overrides config default)
  --negative PATH         YAML negative prompt file (overrides config default)
  --categories SLUG+      Filter by category slug(s)
  --subcategories SLUG+   Filter by subcategory slug(s)
  --formats FORMAT+       video_hd · thumbnail_long · video_shorts
  --model MODEL           juggernaut · flux · turbo · realvis
  --subject-count N       Subjects per topic (0 = all)
  --subject-list SLUG+    Explicit subject list
  --scenes SLUG+          Filter by scene slug(s)
  --count N               Images per topic×subject combination

Workflow:
  --dry-run               Preview plan without generating
  --list-categories       Show all categories, topics, and scenes
  --audit                 Scan library and report coverage
  --audit-shorts          Same as --audit for the shorts format
  --target N              Target images per scene for audit (default: 40)

Supported Models

Model key Architecture VRAM Speed Best for
juggernaut SDXL (checkpoint) 6 GB ⚡⚡⚡ Daily runs, photorealism
flux FLUX Schnell GGUF 6 GB ⚡ Maximum quality overnight
turbo SDXL Turbo 6 GB ⚡⚡⚡⚡ Quick previews, Shorts
realvis SDXL (checkpoint) 6 GB ⚡⚡⚡ Alternative photorealism

Requirements

  • Python 3.11+
  • ComfyUI running on localhost:8188
  • At least one supported model downloaded
  • 6+ GB VRAM (NVIDIA GPU recommended; Apple Silicon supported; CPU fallback available)
  • pip install pyyaml pillow requests

Roadmap

  • Web UI for library audit and review
  • Parallel generation (multiple ComfyUI instances)
  • Stable Diffusion 3 model support
  • Google Drive / S3 upload integration
  • Automatic subject prompt enhancement via local LLM
  • library-health.yaml, library-food.yaml example packs

Pricing

Tier Price License
Solo $29 one-time 1 licensed user, personal or commercial use, unlimited image generation
Creator $59 one-time 1 licensed user, commercial use, client deliverables allowed
Studio $149 one-time Up to 5 licensed users, agencies and teams
Enterprise Contact Unlimited users, white-label rights, priority support

All tiers include lifetime access to the version purchased and free updates within the same major version.
Redistribution, resale, and sublicensing are strictly prohibited. See LICENSE.txt.

Buy Solo License → · Buy Creator License → · Buy Studio License →


Support & Feedback

Found a bug or have a question? Open an issue and include your OS, Python version, and the error message.

Feature requests are welcome via issues and are considered for future releases.


License

This software is proprietary and commercially licensed. All rights reserved.
Copying, redistribution, sublicensing, and resale are strictly prohibited.
See LICENSE.txt for the full terms.


Built with ❤️ by creators, for creators.
If this saved you time, consider starring the repo ⭐

About

Generate thousands of organized, production-ready images for any domain. YouTube channels · Content creators · Marketing teams · AI researchers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors