mirror of
https://github.com/vladmandic/automatic
synced 2026-08-26 15:16:01 +02:00
add reference models to gallery
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
+4
-3
@@ -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
|
||||
|
||||
@@ -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)]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user