You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: finalize dataset directory before media initialization #1056
Finalize the dataset directory after the resume decision and before initializing media storage. Give each run one final path so normal generation does not need to rewrite the cached dataset name or refresh media paths afterward.
Technical Details & Implementation Plan
Defer media storage initialization until the dataset directory is finalized.
Keep fresh-directory allocation atomic, including collisions on the base and timestamped names.
Preserve compatible resume, incompatible IF_POSSIBLE fallback, completed-run short-circuits, and previews that do not create dataset directories.
Simplify cached-name invalidation and media-path refresh where the revised lifecycle makes them unnecessary.
Cover fresh runs, resume decisions, concurrent allocation, image paths, and previews with regression tests.
ArtifactStorage.validate_folder_names() currently initializes MediaStorage using base_dataset_path, which resolves and caches the dataset name during construction. DatasetBuilder.build() later decides whether to resume or start fresh. Fresh-directory allocation can change the chosen name, requiring a cache rewrite and refresh_media_storage_path().
Dependencies
Follow-up to #1051. This refactor does not block that bug fix.
Activity