diff --git a/CHANGELOG.md b/CHANGELOG.md index 8df2b449e..6b9489f7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ # Change Log for SD.Next -## Update for 2025-09-08 +## Update for 2025-09-10 -### Highlights for 2025-09-08 +### Highlights for 2025-09-10 *What's new*? Big one is that we're (finally) switching the default UI to **ModernUI**! StandardUI is still available and can be selected in settings, but ModernUI is now the default for new installs @@ -12,7 +12,7 @@ Also, there are quite a few offloading improvements and many quality-of-life cha [ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) -### Details for 2025-09-08 +### Details for 2025-09-10 - **Models** - **Chroma** final versions: [Chroma1-HD](https://huggingface.co/lodestones/Chroma1-HD), [Chroma1-Base](https://huggingface.co/lodestones/Chroma1-Base) and [Chroma1-Flash](https://huggingface.co/lodestones/Chroma1-Flash) @@ -50,6 +50,7 @@ Also, there are quite a few offloading improvements and many quality-of-life cha *example*: if panel width is less than specified value, layout switches to verical - configurable grid images size in *settings -> user interface -> grid image size* + - gallery now includes reference model images - **Offloading** - enable offload during pre-forward by default - improve offloading of models with multiple dits diff --git a/modules/api/gallery.py b/modules/api/gallery.py index 8b74e2c04..8e0aa5b18 100644 --- a/modules/api/gallery.py +++ b/modules/api/gallery.py @@ -128,8 +128,10 @@ def register_api(app: FastAPI): # register api # @app.get('/sdapi/v1/browser/folders', response_model=List[str]) def get_folders(): + reference_dir = os.path.join('models', 'Reference') folders = [shared.opts.data.get(f, '') for f in OPTS_FOLDERS] folders += list(shared.opts.browser_folders.split(',')) + folders += [reference_dir] folders = [f.strip() for f in folders if f != ''] folders = list(dict.fromkeys(folders)) # filter duplicates folders = [f for f in folders if os.path.isdir(f)] diff --git a/modules/ui_common.py b/modules/ui_common.py index 8d7147d26..1c5499cf7 100644 --- a/modules/ui_common.py +++ b/modules/ui_common.py @@ -69,9 +69,13 @@ def delete_files(js_data, files, all_files, index): deleted = [] all_files = [f.split('/file=')[1] if 'file=' in f else f for f in all_files] if isinstance(all_files, list) else [] all_files = [os.path.normpath(f) for f in all_files] + reference_dir = os.path.join('models', 'Reference') for _image_index, filedata in enumerate(files, start_index): try: fn = os.path.normpath(filedata['name']) + if reference_dir in fn: + shared.log.warning(f'Delete: file="{fn}" not allowed') + continue if os.path.exists(fn) and os.path.isfile(fn): deleted.append(fn) os.remove(fn)