Spaces:
Running
Running
Add ltx, klein.
Browse files- index.html +162 -4
index.html
CHANGED
|
@@ -902,6 +902,9 @@
|
|
| 902 |
background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
|
| 903 |
}
|
| 904 |
|
|
|
|
|
|
|
|
|
|
| 905 |
.framework-label[data-framework="SDXL"] {
|
| 906 |
background: linear-gradient(135deg, #84cc16 0%, #22c55e 100%);
|
| 907 |
}
|
|
@@ -1207,6 +1210,11 @@
|
|
| 1207 |
color: #c4b5fd;
|
| 1208 |
}
|
| 1209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1210 |
.daily-upload-model[data-type="sdxl"] {
|
| 1211 |
background: rgba(34, 197, 94, 0.2);
|
| 1212 |
color: #86efac;
|
|
@@ -1423,6 +1431,15 @@
|
|
| 1423 |
<span>SDXL</span>
|
| 1424 |
</label>
|
| 1425 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1426 |
<label class="checkbox-label">
|
| 1427 |
<input
|
| 1428 |
id="selectedZimage"
|
|
@@ -1432,6 +1449,15 @@
|
|
| 1432 |
<span>ZImage</span>
|
| 1433 |
</label>
|
| 1434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1435 |
<label class="checkbox-label">
|
| 1436 |
<input
|
| 1437 |
id="selectedQwen"
|
|
@@ -1850,6 +1876,8 @@
|
|
| 1850 |
if (document.getElementById('selectedSdxl').checked) selectedTypes.push('sdxl');
|
| 1851 |
if (document.getElementById('selectedZimage').checked) selectedTypes.push('zimage');
|
| 1852 |
if (document.getElementById('selectedQwen').checked) selectedTypes.push('qwen');
|
|
|
|
|
|
|
| 1853 |
return selectedTypes;
|
| 1854 |
}
|
| 1855 |
|
|
@@ -1891,8 +1919,10 @@
|
|
| 1891 |
lora: 'SD LoRA',
|
| 1892 |
embedding: 'SD Embedding',
|
| 1893 |
flux: 'Flux',
|
|
|
|
| 1894 |
wan: 'WAN',
|
| 1895 |
sdxl: 'SDXL',
|
|
|
|
| 1896 |
qwen: 'Qwen',
|
| 1897 |
zimage: 'ZImage'
|
| 1898 |
};
|
|
@@ -1986,6 +2016,20 @@
|
|
| 1986 |
}
|
| 1987 |
|
| 1988 |
// Find all people who had uploads on this date
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1989 |
const uploadsOnDate = [];
|
| 1990 |
for (const [personKey, personData] of Object.entries(uploadData.data)) {
|
| 1991 |
const modelsOnDate = [];
|
|
@@ -2001,6 +2045,12 @@
|
|
| 2001 |
}
|
| 2002 |
}
|
| 2003 |
if (modelsOnDate.length > 0) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2004 |
uploadsOnDate.push({ person: personKey, models: modelsOnDate });
|
| 2005 |
}
|
| 2006 |
}
|
|
@@ -2056,8 +2106,10 @@
|
|
| 2056 |
lora: 'small-loras',
|
| 2057 |
embedding: 'embeddings',
|
| 2058 |
flux: 'flux',
|
|
|
|
| 2059 |
wan: 'wan',
|
| 2060 |
sdxl: 'sdxl',
|
|
|
|
| 2061 |
qwen: 'qwen',
|
| 2062 |
zimage: 'zimage'
|
| 2063 |
};
|
|
@@ -2129,6 +2181,7 @@
|
|
| 2129 |
const modalTitle = document.getElementById('modalTitle');
|
| 2130 |
const modalImage = document.getElementById('modalImage');
|
| 2131 |
const modalStats = document.getElementById('modalStats');
|
|
|
|
| 2132 |
|
| 2133 |
// Generate HuggingFace links using actual filenames from data-filenames.js
|
| 2134 |
const personName = element.key;
|
|
@@ -2138,6 +2191,12 @@
|
|
| 2138 |
modalTitle.textContent = element.key;
|
| 2139 |
modalImage.src = element.imageUrl ?? unknownImage;
|
| 2140 |
modalImage.alt = element.key;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2141 |
|
| 2142 |
modalStats.innerHTML = `
|
| 2143 |
<div class="modal-stat-row">
|
|
@@ -2176,12 +2235,24 @@
|
|
| 2176 |
${formatModalHFLinks(element.sdxl, 'sdxl', personFilenames.sdxl)}
|
| 2177 |
</span>
|
| 2178 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2179 |
<div class="modal-stat-row">
|
| 2180 |
<span class="modal-stat-label">${yesNo(element.zimage)} ZImage</span>
|
| 2181 |
<span class="modal-stat-value">
|
| 2182 |
${formatModalHFLinks(element.zimage, 'zimage', personFilenames.zimage)}
|
| 2183 |
</span>
|
| 2184 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2185 |
<div class="modal-stat-row">
|
| 2186 |
<span class="modal-stat-label">${yesNo(element.qwen)} Qwen</span>
|
| 2187 |
<span class="modal-stat-value">
|
|
@@ -2220,6 +2291,7 @@
|
|
| 2220 |
flux: [],
|
| 2221 |
wan: [],
|
| 2222 |
sdxl: [],
|
|
|
|
| 2223 |
qwen: [],
|
| 2224 |
};
|
| 2225 |
|
|
@@ -2289,6 +2361,22 @@
|
|
| 2289 |
}
|
| 2290 |
});
|
| 2291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2292 |
models.qwens.forEach((qwen) => {
|
| 2293 |
const key = prepareKey(qwen.name);
|
| 2294 |
if (presence[key] !== undefined) {
|
|
@@ -2319,8 +2407,10 @@
|
|
| 2319 |
lora: presence[property].lora,
|
| 2320 |
embedding: presence[property].embedding,
|
| 2321 |
flux: presence[property].flux,
|
|
|
|
| 2322 |
wan: presence[property].wan,
|
| 2323 |
sdxl: presence[property].sdxl,
|
|
|
|
| 2324 |
zimage: presence[property].zimage,
|
| 2325 |
qwen: presence[property].qwen,
|
| 2326 |
mega: undefined,
|
|
@@ -2329,14 +2419,52 @@
|
|
| 2329 |
loraHFLink: presence[property]?.loraHFLink,
|
| 2330 |
embeddingHFLink: presence[property]?.embeddingHFLink,
|
| 2331 |
fluxHFLink: presence[property]?.fluxHFLink,
|
|
|
|
| 2332 |
wanHFLink: presence[property]?.wanHFLink,
|
| 2333 |
sdxlHFLink: presence[property]?.sdxlHFLink,
|
|
|
|
| 2334 |
zimageHFLink: presence[property]?.zimageHFLink,
|
| 2335 |
qwenHFLink: presence[property]?.qwenHFLink,
|
| 2336 |
};
|
| 2337 |
presenceModels.push(element);
|
| 2338 |
}
|
| 2339 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2340 |
function searchModelsModern(value) {
|
| 2341 |
const lowerCaseValue = value.toLowerCase();
|
| 2342 |
const sortBy = getSortBy();
|
|
@@ -2471,12 +2599,22 @@
|
|
| 2471 |
images.push(...personHFImages.ZImage);
|
| 2472 |
}
|
| 2473 |
|
| 2474 |
-
// 2. Add
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2475 |
if (personHFImages.WAN) {
|
| 2476 |
images.push(...personHFImages.WAN);
|
| 2477 |
}
|
| 2478 |
|
| 2479 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2480 |
// Check each framework in personData for Civitai models
|
| 2481 |
const checkCivitaiImage = (framework, civitaiModels) => {
|
| 2482 |
if (!civitaiModels) return;
|
|
@@ -2498,9 +2636,12 @@
|
|
| 2498 |
checkCivitaiImage('Flux', models.fluxes);
|
| 2499 |
checkCivitaiImage('WAN', models.wans);
|
| 2500 |
checkCivitaiImage('SDXL', models.sdxls);
|
|
|
|
|
|
|
|
|
|
| 2501 |
checkCivitaiImage('Qwen', models.qwens);
|
| 2502 |
|
| 2503 |
-
//
|
| 2504 |
const frameworkOrder = ['LyCORIS', 'Lora', 'Embedding', 'Flux', 'SDXL', 'Qwen'];
|
| 2505 |
for (const fw of frameworkOrder) {
|
| 2506 |
if (personHFImages[fw]) {
|
|
@@ -2513,6 +2654,7 @@
|
|
| 2513 |
|
| 2514 |
function updateImageDisplay() {
|
| 2515 |
const modalImage = document.getElementById('modalImage');
|
|
|
|
| 2516 |
const imageCounter = document.getElementById('imageCounter');
|
| 2517 |
const frameworkLabel = document.getElementById('frameworkLabel');
|
| 2518 |
const imageInfo = document.getElementById('imageInfo');
|
|
@@ -2521,7 +2663,23 @@
|
|
| 2521 |
|
| 2522 |
if (currentImages.length > 0) {
|
| 2523 |
const currentImage = currentImages[currentImageIndex];
|
| 2524 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2525 |
|
| 2526 |
if (currentImages.length > 1) {
|
| 2527 |
imageCounter.textContent = `${currentImageIndex + 1} / ${currentImages.length}`;
|
|
|
|
| 902 |
background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
|
| 903 |
}
|
| 904 |
|
| 905 |
+
.framework-label[data-framework="Klein9"] {
|
| 906 |
+
background: linear-gradient(135deg, #0ea5e9 0%, #facc15 100%);
|
| 907 |
+
}
|
| 908 |
.framework-label[data-framework="SDXL"] {
|
| 909 |
background: linear-gradient(135deg, #84cc16 0%, #22c55e 100%);
|
| 910 |
}
|
|
|
|
| 1210 |
color: #c4b5fd;
|
| 1211 |
}
|
| 1212 |
|
| 1213 |
+
.daily-upload-model[data-type="klein9"] {
|
| 1214 |
+
background: rgba(234, 179, 8, 0.22);
|
| 1215 |
+
color: #fde047;
|
| 1216 |
+
}
|
| 1217 |
+
|
| 1218 |
.daily-upload-model[data-type="sdxl"] {
|
| 1219 |
background: rgba(34, 197, 94, 0.2);
|
| 1220 |
color: #86efac;
|
|
|
|
| 1431 |
<span>SDXL</span>
|
| 1432 |
</label>
|
| 1433 |
|
| 1434 |
+
<label class="checkbox-label">
|
| 1435 |
+
<input
|
| 1436 |
+
id="selectedLtx"
|
| 1437 |
+
type="checkbox"
|
| 1438 |
+
onclick="javascript:searchModels(getCurrentSearchValue());"
|
| 1439 |
+
/>
|
| 1440 |
+
<span>LTX</span>
|
| 1441 |
+
</label>
|
| 1442 |
+
|
| 1443 |
<label class="checkbox-label">
|
| 1444 |
<input
|
| 1445 |
id="selectedZimage"
|
|
|
|
| 1449 |
<span>ZImage</span>
|
| 1450 |
</label>
|
| 1451 |
|
| 1452 |
+
<label class="checkbox-label">
|
| 1453 |
+
<input
|
| 1454 |
+
id="selectedKlein9"
|
| 1455 |
+
type="checkbox"
|
| 1456 |
+
onclick="javascript:searchModels(getCurrentSearchValue());"
|
| 1457 |
+
/>
|
| 1458 |
+
<span>Klein9</span>
|
| 1459 |
+
</label>
|
| 1460 |
+
|
| 1461 |
<label class="checkbox-label">
|
| 1462 |
<input
|
| 1463 |
id="selectedQwen"
|
|
|
|
| 1876 |
if (document.getElementById('selectedSdxl').checked) selectedTypes.push('sdxl');
|
| 1877 |
if (document.getElementById('selectedZimage').checked) selectedTypes.push('zimage');
|
| 1878 |
if (document.getElementById('selectedQwen').checked) selectedTypes.push('qwen');
|
| 1879 |
+
if (document.getElementById('selectedLtx').checked) selectedTypes.push('ltx');
|
| 1880 |
+
if (document.getElementById('selectedKlein9').checked) selectedTypes.push('klein9');
|
| 1881 |
return selectedTypes;
|
| 1882 |
}
|
| 1883 |
|
|
|
|
| 1919 |
lora: 'SD LoRA',
|
| 1920 |
embedding: 'SD Embedding',
|
| 1921 |
flux: 'Flux',
|
| 1922 |
+
klein9: 'Klein9',
|
| 1923 |
wan: 'WAN',
|
| 1924 |
sdxl: 'SDXL',
|
| 1925 |
+
ltx: 'LTX',
|
| 1926 |
qwen: 'Qwen',
|
| 1927 |
zimage: 'ZImage'
|
| 1928 |
};
|
|
|
|
| 2016 |
}
|
| 2017 |
|
| 2018 |
// Find all people who had uploads on this date
|
| 2019 |
+
const modelTypeOrder = [
|
| 2020 |
+
'locon',
|
| 2021 |
+
'lora',
|
| 2022 |
+
'embedding',
|
| 2023 |
+
'flux',
|
| 2024 |
+
'wan',
|
| 2025 |
+
'sdxl',
|
| 2026 |
+
'ltx',
|
| 2027 |
+
'zimage',
|
| 2028 |
+
'klein9',
|
| 2029 |
+
'qwen'
|
| 2030 |
+
];
|
| 2031 |
+
const orderIndex = new Map(modelTypeOrder.map((t, i) => [t, i]));
|
| 2032 |
+
|
| 2033 |
const uploadsOnDate = [];
|
| 2034 |
for (const [personKey, personData] of Object.entries(uploadData.data)) {
|
| 2035 |
const modelsOnDate = [];
|
|
|
|
| 2045 |
}
|
| 2046 |
}
|
| 2047 |
if (modelsOnDate.length > 0) {
|
| 2048 |
+
modelsOnDate.sort((a, b) => {
|
| 2049 |
+
const ai = orderIndex.get(String(a).toLowerCase()) ?? Number.POSITIVE_INFINITY;
|
| 2050 |
+
const bi = orderIndex.get(String(b).toLowerCase()) ?? Number.POSITIVE_INFINITY;
|
| 2051 |
+
if (ai !== bi) return ai - bi;
|
| 2052 |
+
return String(a).localeCompare(String(b));
|
| 2053 |
+
});
|
| 2054 |
uploadsOnDate.push({ person: personKey, models: modelsOnDate });
|
| 2055 |
}
|
| 2056 |
}
|
|
|
|
| 2106 |
lora: 'small-loras',
|
| 2107 |
embedding: 'embeddings',
|
| 2108 |
flux: 'flux',
|
| 2109 |
+
klein9: 'klein9',
|
| 2110 |
wan: 'wan',
|
| 2111 |
sdxl: 'sdxl',
|
| 2112 |
+
ltx: 'ltx',
|
| 2113 |
qwen: 'qwen',
|
| 2114 |
zimage: 'zimage'
|
| 2115 |
};
|
|
|
|
| 2181 |
const modalTitle = document.getElementById('modalTitle');
|
| 2182 |
const modalImage = document.getElementById('modalImage');
|
| 2183 |
const modalStats = document.getElementById('modalStats');
|
| 2184 |
+
const modalVideo = document.getElementById('modalVideo');
|
| 2185 |
|
| 2186 |
// Generate HuggingFace links using actual filenames from data-filenames.js
|
| 2187 |
const personName = element.key;
|
|
|
|
| 2191 |
modalTitle.textContent = element.key;
|
| 2192 |
modalImage.src = element.imageUrl ?? unknownImage;
|
| 2193 |
modalImage.alt = element.key;
|
| 2194 |
+
if (modalVideo) {
|
| 2195 |
+
modalVideo.pause?.();
|
| 2196 |
+
modalVideo.removeAttribute('src');
|
| 2197 |
+
modalVideo.load?.();
|
| 2198 |
+
modalVideo.style.display = 'none';
|
| 2199 |
+
}
|
| 2200 |
|
| 2201 |
modalStats.innerHTML = `
|
| 2202 |
<div class="modal-stat-row">
|
|
|
|
| 2235 |
${formatModalHFLinks(element.sdxl, 'sdxl', personFilenames.sdxl)}
|
| 2236 |
</span>
|
| 2237 |
</div>
|
| 2238 |
+
<div class="modal-stat-row">
|
| 2239 |
+
<span class="modal-stat-label">${yesNo(element.ltx)} LTX</span>
|
| 2240 |
+
<span class="modal-stat-value">
|
| 2241 |
+
${formatModalHFLinks(element.ltx, 'ltx', personFilenames.ltx)}
|
| 2242 |
+
</span>
|
| 2243 |
+
</div>
|
| 2244 |
<div class="modal-stat-row">
|
| 2245 |
<span class="modal-stat-label">${yesNo(element.zimage)} ZImage</span>
|
| 2246 |
<span class="modal-stat-value">
|
| 2247 |
${formatModalHFLinks(element.zimage, 'zimage', personFilenames.zimage)}
|
| 2248 |
</span>
|
| 2249 |
</div>
|
| 2250 |
+
<div class="modal-stat-row">
|
| 2251 |
+
<span class="modal-stat-label">${yesNo(element.klein9)} Klein9</span>
|
| 2252 |
+
<span class="modal-stat-value">
|
| 2253 |
+
${formatModalHFLinks(element.klein9, 'klein9', personFilenames.klein9)}
|
| 2254 |
+
</span>
|
| 2255 |
+
</div>
|
| 2256 |
<div class="modal-stat-row">
|
| 2257 |
<span class="modal-stat-label">${yesNo(element.qwen)} Qwen</span>
|
| 2258 |
<span class="modal-stat-value">
|
|
|
|
| 2291 |
flux: [],
|
| 2292 |
wan: [],
|
| 2293 |
sdxl: [],
|
| 2294 |
+
ltx: [],
|
| 2295 |
qwen: [],
|
| 2296 |
};
|
| 2297 |
|
|
|
|
| 2361 |
}
|
| 2362 |
});
|
| 2363 |
|
| 2364 |
+
if (models.ltxes) {
|
| 2365 |
+
models.ltxes.forEach((ltx) => {
|
| 2366 |
+
const key = prepareKey(ltx.name);
|
| 2367 |
+
if (presence[key] !== undefined) {
|
| 2368 |
+
presence[key].ltxCivitai = true;
|
| 2369 |
+
setImageUrl(key, ltx.imageUrl);
|
| 2370 |
+
presence[key].ltxCivitaiLink = ltx.url;
|
| 2371 |
+
} else if (!isKnownSkippableKey(key)) {
|
| 2372 |
+
if (!notMatched.ltx) {
|
| 2373 |
+
notMatched.ltx = [];
|
| 2374 |
+
}
|
| 2375 |
+
notMatched.ltx.push(key);
|
| 2376 |
+
}
|
| 2377 |
+
});
|
| 2378 |
+
}
|
| 2379 |
+
|
| 2380 |
models.qwens.forEach((qwen) => {
|
| 2381 |
const key = prepareKey(qwen.name);
|
| 2382 |
if (presence[key] !== undefined) {
|
|
|
|
| 2407 |
lora: presence[property].lora,
|
| 2408 |
embedding: presence[property].embedding,
|
| 2409 |
flux: presence[property].flux,
|
| 2410 |
+
klein9: presence[property].klein9,
|
| 2411 |
wan: presence[property].wan,
|
| 2412 |
sdxl: presence[property].sdxl,
|
| 2413 |
+
ltx: presence[property].ltx,
|
| 2414 |
zimage: presence[property].zimage,
|
| 2415 |
qwen: presence[property].qwen,
|
| 2416 |
mega: undefined,
|
|
|
|
| 2419 |
loraHFLink: presence[property]?.loraHFLink,
|
| 2420 |
embeddingHFLink: presence[property]?.embeddingHFLink,
|
| 2421 |
fluxHFLink: presence[property]?.fluxHFLink,
|
| 2422 |
+
klein9HFLink: presence[property]?.klein9HFLink,
|
| 2423 |
wanHFLink: presence[property]?.wanHFLink,
|
| 2424 |
sdxlHFLink: presence[property]?.sdxlHFLink,
|
| 2425 |
+
ltxHFLink: presence[property]?.ltxHFLink,
|
| 2426 |
zimageHFLink: presence[property]?.zimageHFLink,
|
| 2427 |
qwenHFLink: presence[property]?.qwenHFLink,
|
| 2428 |
};
|
| 2429 |
presenceModels.push(element);
|
| 2430 |
}
|
| 2431 |
|
| 2432 |
+
function filterByType(element) {
|
| 2433 |
+
const mode = document.getElementById('searchMode').value;
|
| 2434 |
+
const filters = [
|
| 2435 |
+
{ selected: document.getElementById('selectedLocon').checked, property: element.locon },
|
| 2436 |
+
{ selected: document.getElementById('selectedLora').checked, property: element.lora },
|
| 2437 |
+
{ selected: document.getElementById('selectedEmbedding').checked, property: element.embedding },
|
| 2438 |
+
{ selected: document.getElementById('selectedFlux').checked, property: element.flux },
|
| 2439 |
+
{ selected: document.getElementById('selectedWan').checked, property: element.wan },
|
| 2440 |
+
{ selected: document.getElementById('selectedSdxl').checked, property: element.sdxl },
|
| 2441 |
+
{ selected: document.getElementById('selectedLtx').checked, property: element.ltx },
|
| 2442 |
+
{ selected: document.getElementById('selectedZimage').checked, property: element.zimage },
|
| 2443 |
+
{ selected: document.getElementById('selectedKlein9').checked, property: element.klein9 },
|
| 2444 |
+
{ selected: document.getElementById('selectedQwen').checked, property: element.qwen },
|
| 2445 |
+
];
|
| 2446 |
+
|
| 2447 |
+
// If no filters are selected, show all
|
| 2448 |
+
const anySelected = filters.some((f) => f.selected);
|
| 2449 |
+
if (!anySelected) {
|
| 2450 |
+
return true;
|
| 2451 |
+
}
|
| 2452 |
+
|
| 2453 |
+
// Check each selected filter
|
| 2454 |
+
for (const filter of filters) {
|
| 2455 |
+
if (filter.selected) {
|
| 2456 |
+
if (mode === 'available' && !filter.property) {
|
| 2457 |
+
return false;
|
| 2458 |
+
}
|
| 2459 |
+
if (mode === 'missing' && filter.property) {
|
| 2460 |
+
return false;
|
| 2461 |
+
}
|
| 2462 |
+
}
|
| 2463 |
+
}
|
| 2464 |
+
|
| 2465 |
+
return true;
|
| 2466 |
+
}
|
| 2467 |
+
|
| 2468 |
function searchModelsModern(value) {
|
| 2469 |
const lowerCaseValue = value.toLowerCase();
|
| 2470 |
const sortBy = getSortBy();
|
|
|
|
| 2599 |
images.push(...personHFImages.ZImage);
|
| 2600 |
}
|
| 2601 |
|
| 2602 |
+
// 2. Add Klein9 samples second (from HF samples data)
|
| 2603 |
+
if (personHFImages.Klein9) {
|
| 2604 |
+
images.push(...personHFImages.Klein9);
|
| 2605 |
+
}
|
| 2606 |
+
|
| 2607 |
+
// 3. Add WAN samples (from HF samples data)
|
| 2608 |
if (personHFImages.WAN) {
|
| 2609 |
images.push(...personHFImages.WAN);
|
| 2610 |
}
|
| 2611 |
|
| 2612 |
+
// 4. Add LTX samples (from HF samples data)
|
| 2613 |
+
if (personHFImages.LTX) {
|
| 2614 |
+
images.push(...personHFImages.LTX);
|
| 2615 |
+
}
|
| 2616 |
+
|
| 2617 |
+
// 5. Add Civitai images by type
|
| 2618 |
// Check each framework in personData for Civitai models
|
| 2619 |
const checkCivitaiImage = (framework, civitaiModels) => {
|
| 2620 |
if (!civitaiModels) return;
|
|
|
|
| 2636 |
checkCivitaiImage('Flux', models.fluxes);
|
| 2637 |
checkCivitaiImage('WAN', models.wans);
|
| 2638 |
checkCivitaiImage('SDXL', models.sdxls);
|
| 2639 |
+
if (models.ltxes) {
|
| 2640 |
+
checkCivitaiImage('LTX', models.ltxes);
|
| 2641 |
+
}
|
| 2642 |
checkCivitaiImage('Qwen', models.qwens);
|
| 2643 |
|
| 2644 |
+
// 6. Add other HF samples (excluding ZImage, Klein9, WAN and LTX which are already added)
|
| 2645 |
const frameworkOrder = ['LyCORIS', 'Lora', 'Embedding', 'Flux', 'SDXL', 'Qwen'];
|
| 2646 |
for (const fw of frameworkOrder) {
|
| 2647 |
if (personHFImages[fw]) {
|
|
|
|
| 2654 |
|
| 2655 |
function updateImageDisplay() {
|
| 2656 |
const modalImage = document.getElementById('modalImage');
|
| 2657 |
+
const modalVideo = document.getElementById('modalVideo');
|
| 2658 |
const imageCounter = document.getElementById('imageCounter');
|
| 2659 |
const frameworkLabel = document.getElementById('frameworkLabel');
|
| 2660 |
const imageInfo = document.getElementById('imageInfo');
|
|
|
|
| 2663 |
|
| 2664 |
if (currentImages.length > 0) {
|
| 2665 |
const currentImage = currentImages[currentImageIndex];
|
| 2666 |
+
const isVideo = currentImage.url.toLowerCase().endsWith('.mp4');
|
| 2667 |
+
if (isVideo) {
|
| 2668 |
+
if (modalVideo) {
|
| 2669 |
+
modalVideo.src = currentImage.url;
|
| 2670 |
+
modalVideo.style.display = 'block';
|
| 2671 |
+
}
|
| 2672 |
+
modalImage.style.display = 'none';
|
| 2673 |
+
} else {
|
| 2674 |
+
modalImage.src = currentImage.url;
|
| 2675 |
+
modalImage.style.display = 'block';
|
| 2676 |
+
if (modalVideo) {
|
| 2677 |
+
modalVideo.pause?.();
|
| 2678 |
+
modalVideo.removeAttribute('src');
|
| 2679 |
+
modalVideo.load?.();
|
| 2680 |
+
modalVideo.style.display = 'none';
|
| 2681 |
+
}
|
| 2682 |
+
}
|
| 2683 |
|
| 2684 |
if (currentImages.length > 1) {
|
| 2685 |
imageCounter.textContent = `${currentImageIndex + 1} / ${currentImages.length}`;
|