🔬 Forge Grid: Sampler × Scheduler script
Download Files
About this version
🚀 Better! Faster! Stronger!
This update removes artificial limits, fixes layout asymmetry, and makes grids more predictable, tidy, and memory‑safe.
đź“‚ File naming and storage
Before: Timestamp in seconds could collide during rapid saves.
After: Millisecond timestamps ensure unique names even for consecutive saves.
🗂️ Folder organization
Before: Results were stored in
outputs/🔬 Sampler × Scheduler Grid (Forge)(emoji in path).After: Now stored in
outputs/sampler_scheduler_grid_forge— cleaner and more OS/script‑friendly.
🏷️ Image labels
Before: Different formulas for top and side spacing (
+6vs+40) made grids visually asymmetric.After: Unified
label_gapparameter. Both top and side use the same rule (2 * label_gap) for clean, harmonious symmetry.
🛑 Stopping generation
Before: “🛑 Stop Grid Generation” could behave inconsistently.
After:
state.interruptedchecks added inside XY and Batch loops. Stopping is clean and predictable.
🖼️ Grid limits
Before: Hard limit of 50 cells in XY Grid.
After: Limit removed. Only technical safeguard remains: global size cap of 16,383 px with auto‑downscale when exceeded.
📜 Logging and messages
Before: Sparse logging.
After: Console prints added, with clear warnings on interruption and downscale, plus detailed save messages.
đź’ľ Saving and memory
Before: Images were saved but not closed, risking memory leaks.
After: Only temporary resized copies (
out) are closed; live images remain available for Gradio.gc.collect()runs at the end.
đź§© Code improvements
Before: Duplicate imports and scattered parameters.
After: Cleaner structure, simplified logic, and
sanitize_filenamefor safe file names.
đź§® UI enhancements
Before: Manual selection only; no quick way to fill or clear sampler/scheduler lists.
After: Added “✅ Select All” and “🧹 Clear All” buttons for both Sampler(s) and Scheduler(s) in XY Grid — intuitive, fast, and layout‑friendly.
📊 Summary. Before / After
Unique names: Seconds → milliseconds
Folder path: Emoji → clean ASCII
Label symmetry: Mixed gaps → unified
label_gapwith2 * label_gapStop behavior: Unreliable → consistent with
state.interruptedGrid size: 50‑cell cap → technical safeguard at 16,383 px + auto‑downscale
Logs: Minimal → detailed saves and warnings
Memory: Potential leaks → close only temps, GC at end
Codebase: Duplicates → clean structure,
sanitize_filenameUI controls: Manual selection only → select/Clear buttons for Sampler & Scheduler
Grids are now unlimited, symmetric, and safe — and the code is cleaner, more reliable, and friendlier for daily use.


