๐งช LoRa x Sampler x Scheduler Grid (Forge)
Download Files
About this version
โ๏ธ Core Logic
๐ Integrated state.interrupt()
Stop button now halts generation predictably in both XY Grid and Batch Grid modes.
Added
if state.interrupted:checks with graceful early exits usingsafe_processed().Handles all nested loops to prevent Forge from hanging during interruption.
๐งฉ Grid Layout Logging
Added console info before generation:
๐งฉ XY Grid layout โ rows=..., cols=..., samplers=..., schedulers=..., weights=...Helps visualize grid setup and total iteration count.
โ๏ธ LoRA Weight Orientation Fix
When LoRA Label Position =
โฌ ๏ธ Leftorโก๏ธ Right,
โ LoRA weights are now ordered bottom (min) โ top (max),
matching intuitive Y-axis behavior.Implemented by reversing the
current_weightslist before XY Grid generation.
๐จ Prompt / LoRA Handling
๐ง Rewritten apply_params()
LoRA is skipped entirely when
weight == 0.0.
โ No LoRA tag or trigger word is added to the prompt.Prevents duplicate trigger words or
<lora:...>tags.Cleans redundant commas/spaces, keeping prompt formatting consistent.
New prompt assembly order:
[main prompt], <lora:name:weight>, triggerMetadata no longer contains stray โ, , , , ,โ.
๐งฉ XY Grid
โ Improved generation loop
Proper row/column indexing for vertical vs. horizontal orientation.
Ensures every generated cell is saved when
save_cells=True.Compatible with all label positions (
Top,Bottom,Left,Right).
๐งพ Enhanced logging
Each iteration now prints detailed progress:
๐[7/36] Sampler='Euler a', Scheduler='Automatic', LoRA='Apone3d', Weight=0.50, Seed=...Uniform logging style between XY and Batch grids.
๐งฉ Batch Grid
โ๏ธ Refined control flow
Added
state.interrupt()safety checks to every nested loop.Clean exit with clear logs:
๐ Generation manually stopped by user.LoRA weight = 0.0 now behaves identically to XY Grid โ
no LoRA, no trigger applied.
๐งฉ Grid validation & saving
Improved
validate_cells_for_grid()output:๐ซ Grid validation issues: โ Cell [1,2] is None ...Prevents saving empty or invalid grids.
Saved cell filenames now include all relevant parameters:
LoRA_W0.50_S-Euler_SchAutomatic_1_2.webp
๐ฌ Logging & UX
Consistent emoji-coded messages:
๐ start โข ๐ progress โข ๐พ save โข ๐ interrupt โข โ done โข โ errorAll
print()calls useflush=Trueโ immediate terminal output.Added
gc.collect()after grid creation for better memory cleanup.
๐งฐ Internal Improvements
Removed redundant
build_grid_labels()calls.Simplified nested loop logic and unified naming (
sampler_label,scheduler_label).Standardized
get_cell_indices()parameters andorientationhandling.Minor refactors for clarity and alignment with Forge UI behavior.
๐งพ Summary
๐ Stop Handling: Integrated state.interrupt()โ Predictable halts
โ๏ธ Vertical LoRA: Reversed weights โ Bottom=min - Top=max
๐ง Prompt Logic: Rebuilt apply_params()โ Clean, deduplicated prompts
๐งฉ XY Grid: Added layout logging โ Clear grid overview
๐งฑ Batch Grid: Unified LoRA & trigger logic โ Consistent output
๐ฌ Logging: Emoji + flush โ Readable, real-time feedback
๐งน Memory: Added gc.collect() โ No residual memory buildup






