Skip to content

Forge Grid Sampler Scheduler is a modular Python script for generating structured image grids with labeled cells. It supports dynamic layout scheduling, custom label placement, fallback rendering, and PNG/WEBP export. Ideal for visual organization, presentation, and image pipeline workflows.

License

Notifications You must be signed in to change notification settings

PupaBoo/sampler_x_scheduler_grid_forge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔬 Sampler × Scheduler Grid (Forge)

💡 A script for generating image grids in Stable Diffusion Forge. Explore sampler and scheduler combinations, compare results, save individual cells, and achieve stable output — even with errors.

📝 Description

The script generates image grids in two modes: XY Grid and Batch Grid. XY Grid now produces two versions: one with labels and one without for cleaner visual comparison.

✨ Features

  • 🤸‍♂️ Flexible Modes: XY Grid for automatic combinatorial testing and Batch Grid for custom pairs added via interface and/or manual input.
  • 🔮 Intuitive Interface: Gradio interface with dropdowns, text fields, and buttons for easy configuration.
  • 📋 Detailed Logging: Each pair (sampler and scheduler) generation is logged in the terminal with progress, and errors are logged in detail.
  • 🪄 Auto-Downscaling: Grids exceeding 16380 pixels are automatically resized without quality loss to maintain performance.
  • 🛠️ Customizable Output: Text labels for sampler and scheduler with custom font support (Barlow-SemiBold.ttf recommended).
  • ⚠️ Fallback Images: Generation failures show informative error images instead of stopping the process.
  • 🚰 Duplicate Filtering: Duplicate pairs in Batch Grid are automatically removed to prevent errors.
  • 🔀 Flexible Parameters: Configure prompts, seed, steps (1-100), CFG (1.0-30.0), dimensions (256-2048 px), padding (0-200 px).
  • 📅 Individual Cell Saving: Save to outputs/cells folder via checkbox option.
  • 💾 PNG and WEBP Support: Choose one or both formats.
  • 🏷️ Smart Label Positioning: Configurable label positions with collision detection.
  • 🏷️ Dual XY Grid Output: Generates both labeled and unlabeled versions of XY Grid.
  • 🛑 Stop Generation: Dedicated button to interrupt long-running generations.

⚙️ Installation

  1. Clone the repository into your Forge /extensions/ folder:

    git clone https://github.com/PupaBoo/sampler_x_scheduler_grid_forge
    
  2. Navigate to the project directory:

    cd Forge-Grid-Sampler-Scheduler
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. (Optional) Place the Barlow-SemiBold.ttf font in the fonts/ folder for improved label display.

  5. Restart Forge WebUI.

🚀 Usage

  1. Launch Forge WebUI and select 🔬 Sampler × Scheduler Grid (Forge) from the txt2img script dropdown.
  2. Choose a mode:
    • XY Grid: Select samplers and schedulers for X and Y axes via dropdowns. The grid forms all possible combinations.
    • Batch Grid: Add sampler-scheduler pairs via dropdowns (using the "Add Pair" button) or manually in the text field (e.g., Euler a, Automatic per line).
  3. Configure parameters:
    • Positive/negative prompt
    • Seed (leave blank for random)
    • Steps, CFG, image dimensions, padding, save format (WEBP/PNG)
    • Label positions and visibility
    • Individual cell saving option
  4. Click "Generate" to create the grid. Pair progress and errors are logged in the terminal. Use "Stop Generation" to interrupt.

🛠 Requirements

  • Stable Diffusion Forge
  • Python 3.7+
  • Libraries: gradio, Pillow (included with Forge)

⚠️ Limitations

  • Works only in txt2img mode
  • Very large grids may require significant VRAM
  • Font rendering depends on available system fonts if Barlow font is not found

📜 License

MIT License © 2025 - Free to use with attribution.

🙌 Acknowledgments

  • Built with Gradio and Pillow libraries
  • Developed with AI assistance tools
  • Inspired by the needs of the Stable Diffusion artist community

🤝 Contributing

Feedback, bug reports, and feature suggestions are welcome. Please report issues with detailed descriptions of the problem and your configuration.

📸 Examples


🧩 Batch Grid

🔄 XY Grid (With Labels)

🧩 Batch Grid (Without Labels)

About

Forge Grid Sampler Scheduler is a modular Python script for generating structured image grids with labeled cells. It supports dynamic layout scheduling, custom label placement, fallback rendering, and PNG/WEBP export. Ideal for visual organization, presentation, and image pipeline workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages