mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-03-23 06:40:23 -07:00
- Add modules/opts_snapshot.py with create_opts_snapshot(opts) - Capture snapshot in process_images_inner after prepare_prompt_seed_state - Full shallow copy of opts.data via SimpleNamespace - No runtime behavior change; snapshot write-only for M07 Made-with: Cursor
15 lines
448 B
Python
15 lines
448 B
Python
"""Opts snapshot for generation runs.
|
|
|
|
M07: Deterministic snapshot of shared.opts for the duration of a run.
|
|
Behavior-preserving: shallow copy of opts.data.
|
|
Not yet threaded through runtime.
|
|
"""
|
|
from types import SimpleNamespace
|
|
|
|
|
|
def create_opts_snapshot(opts):
|
|
"""
|
|
Create an immutable snapshot of shared.opts for a generation run.
|
|
Behavior-preserving: shallow copy of opts.data.
|
|
"""
|
|
return SimpleNamespace(**opts.data.copy())
|