add reference models to gallery

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-09-10 10:21:51 -04:00
parent 4c684143a4
commit 6a0090714c
3 changed files with 10 additions and 3 deletions
+4 -3
View File
@@ -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
+2
View File
@@ -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)]
+4
View File
@@ -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)