remove standardui previews
Signed-off-by: Vladimir Mandic <mandic00@live.com>pull/4175/head
|
|
@ -1 +1 @@
|
|||
Subproject commit 94ebcce25b43fd8bd2716902b91090dc65afd44e
|
||||
Subproject commit bd60be82e47d1e993c8601edb5cfca57e8a82518
|
||||
|
Before Width: | Height: | Size: 104 KiB |
|
Before Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 301 KiB |
|
Before Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 215 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<filter id='shadow' color-interpolation-filters="sRGB">
|
||||
<feDropShadow flood-color="black" dx="0" dy="0" flood-opacity="0.9" stdDeviation="0.5"/>
|
||||
<feDropShadow flood-color="black" dx="0" dy="0" flood-opacity="0.9" stdDeviation="0.5"/>
|
||||
</filter>
|
||||
<path style="filter:url(#shadow);" fill="#FFFFFF" d="M13.18 19C13.35 19.72 13.64 20.39 14.03 21H5C3.9 21 3 20.11 3 19V5C3 3.9 3.9 3 5 3H19C20.11 3 21 3.9 21 5V11.18C20.5 11.07 20 11 19.5 11C19.33 11 19.17 11 19 11.03V5H5V19H13.18M11.21 15.83L9.25 13.47L6.5 17H13.03C13.14 15.54 13.73 14.22 14.64 13.19L13.96 12.29L11.21 15.83M19 13.5V12L16.75 14.25L19 16.5V15C20.38 15 21.5 16.12 21.5 17.5C21.5 17.9 21.41 18.28 21.24 18.62L22.33 19.71C22.75 19.08 23 18.32 23 17.5C23 15.29 21.21 13.5 19 13.5M19 20C17.62 20 16.5 18.88 16.5 17.5C16.5 17.1 16.59 16.72 16.76 16.38L15.67 15.29C15.25 15.92 15 16.68 15 17.5C15 19.71 16.79 21.5 19 21.5V23L21.25 20.75L19 18.5V20Z" />
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 989 B |
BIN
html/invoked.jpg
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 157 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
|
@ -953,7 +953,7 @@ svg.feather.feather-image,
|
|||
}
|
||||
|
||||
/* No Preview Card Styles */
|
||||
.extra-network-cards .card:has(>img[src*="card-no-preview.png"])::before {
|
||||
.extra-network-cards .card:has(>img[src*="missing.png"])::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ async function modelCardClick(id) {
|
|||
downloads: data.downloads?.toString() || '',
|
||||
creator,
|
||||
desc: data.desc || 'no description available',
|
||||
image: images.length > 0 ? images[0] : '/sdapi/v1/network/thumb?filename=html/card-no-preview.png',
|
||||
image: images.length > 0 ? images[0] : '/sdapi/v1/network/thumb?filename=html/missing.png',
|
||||
versions: versionsHTML || '',
|
||||
});
|
||||
el.innerHTML = modelHTML;
|
||||
|
|
|
|||
|
|
@ -1386,7 +1386,7 @@ table.settings-value-table td {
|
|||
z-index: 101; /* Optional: ensure tags are above everything */
|
||||
}
|
||||
|
||||
.extra-network-cards .card:has(>img[src*="card-no-preview.png"])::before {
|
||||
.extra-network-cards .card:has(>img[src*="missing.png"])::before {
|
||||
background-color: var(--data-color);
|
||||
content: '';
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ def atomic_civit_search_metadata(item, results):
|
|||
# log.error(f'CivitAI search metadata: item={item} {e}')
|
||||
return
|
||||
has_meta = os.path.isfile(meta) and os.stat(meta).st_size > 0
|
||||
if ('card-no-preview.png' in item['preview'] or not has_meta) and os.path.isfile(item['filename']):
|
||||
if ('missing.png' in item['preview'] or not has_meta) and os.path.isfile(item['filename']):
|
||||
sha = item.get('hash', None)
|
||||
found = False
|
||||
result = {
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ def create_model_cards(all_models: list[Model]) -> str:
|
|||
if image.url and len(image.url) > 0 and not image.url.lower().endswith('.mp4'):
|
||||
previews.append(image.url)
|
||||
if len(previews) == 0:
|
||||
previews = ['/sdapi/v1/network/thumb?filename=html/card-no-preview.png']
|
||||
previews = ['/sdapi/v1/network/thumb?filename=html/missing.png']
|
||||
all_cards += card.format(id=model.id, name=model.name, type=model.type, preview=previews[0])
|
||||
html = details + cards.format(cards=all_cards)
|
||||
return html
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ class ExtraNetworksPage:
|
|||
"filename": item.get('filename', ''),
|
||||
"short": os.path.splitext(os.path.basename(item.get('filename', '')))[0],
|
||||
"tags": '|'.join([item.get('tags')] if isinstance(item.get('tags', {}), str) else list(item.get('tags', {}).keys())),
|
||||
"preview": html.escape(item.get('preview', None) or self.link_preview('html/card-no-preview.png')),
|
||||
"preview": html.escape(item.get('preview', None) or self.link_preview('html/missing.png')),
|
||||
"width": 'var(--card-size)',
|
||||
"height": 'var(--card-size)' if shared.opts.extra_networks_card_square else 'auto',
|
||||
"fit": shared.opts.extra_networks_card_fit,
|
||||
|
|
@ -375,7 +375,7 @@ class ExtraNetworksPage:
|
|||
|
||||
def find_preview_file(self, path):
|
||||
if path is None:
|
||||
return 'html/card-no-preview.png'
|
||||
return 'html/missing.png'
|
||||
if os.path.join('models', 'Reference') in path:
|
||||
return path
|
||||
exts = ["jpg", "jpeg", "png", "webp", "tiff", "jp2", "jxl"]
|
||||
|
|
@ -392,7 +392,7 @@ class ExtraNetworksPage:
|
|||
if '.thumb.' not in file:
|
||||
self.missing_thumbs.append(file)
|
||||
return file
|
||||
return 'html/card-no-preview.png'
|
||||
return 'html/missing.png'
|
||||
|
||||
def find_preview(self, filename):
|
||||
t0 = time.time()
|
||||
|
|
@ -442,7 +442,7 @@ class ExtraNetworksPage:
|
|||
item['preview'] = self.link_preview(found)
|
||||
debug(f'EN mapped-preview: {item["name"]}={found}')
|
||||
if item.get('preview', None) is None:
|
||||
item['preview'] = self.link_preview('html/card-no-preview.png')
|
||||
item['preview'] = self.link_preview('html/missing.png')
|
||||
debug(f'EN missing-preview: {item["name"]}')
|
||||
self.preview_time += time.time() - t0
|
||||
|
||||
|
|
@ -710,19 +710,19 @@ def create_ui(container, button_parent, tabname, skip_indexing = False):
|
|||
|
||||
def fn_save_img(image):
|
||||
if ui.last_item is None or ui.last_item.local_preview is None:
|
||||
return 'html/card-no-preview.png'
|
||||
return 'html/missing.png'
|
||||
images = []
|
||||
if ui.gallery is not None:
|
||||
images = list(ui.gallery.temp_files) # gallery cannot be used as input component so looking at most recently registered temp files
|
||||
if len(images) < 1:
|
||||
shared.log.warning(f'Network no image: item="{ui.last_item.name}"')
|
||||
return 'html/card-no-preview.png'
|
||||
return 'html/missing.png'
|
||||
try:
|
||||
images.sort(key=lambda f: os.path.getmtime(f), reverse=True)
|
||||
image = Image.open(images[0])
|
||||
except Exception as e:
|
||||
shared.log.error(f'Network error opening image: item="{ui.last_item.name}" {e}')
|
||||
return 'html/card-no-preview.png'
|
||||
return 'html/missing.png'
|
||||
fn_delete_img(image)
|
||||
if image.width > 512 or image.height > 512:
|
||||
image = image.convert('RGB')
|
||||
|
|
@ -741,7 +741,7 @@ def create_ui(container, button_parent, tabname, skip_indexing = False):
|
|||
if os.path.exists(file):
|
||||
os.remove(file)
|
||||
shared.log.debug(f'Network delete image: item="{ui.last_item.name}" filename="{file}"')
|
||||
return 'html/card-no-preview.png'
|
||||
return 'html/missing.png'
|
||||
|
||||
def fn_save_desc(desc):
|
||||
if hasattr(ui.last_item, 'type') and ui.last_item.type == 'Style':
|
||||
|
|
|
|||