Spaces:
Running
Running
Upload index.html
Browse files- index.html +88 -0
index.html
CHANGED
|
@@ -336,6 +336,59 @@
|
|
| 336 |
font-size: 16px;
|
| 337 |
}
|
| 338 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
.mainContent {
|
| 340 |
max-width: 1400px;
|
| 341 |
margin: 0 auto;
|
|
@@ -1859,6 +1912,14 @@
|
|
| 1859 |
<option value="all">All</option>
|
| 1860 |
</select>
|
| 1861 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1862 |
</div>
|
| 1863 |
|
| 1864 |
<div class="controls" style="margin-top: 16px;">
|
|
@@ -2160,6 +2221,7 @@
|
|
| 2160 |
let currentPage = 1;
|
| 2161 |
let totalPages = 1;
|
| 2162 |
let filteredResults = [];
|
|
|
|
| 2163 |
|
| 2164 |
// Upload data (from data-hf-uploaded.js)
|
| 2165 |
const uploadData = {
|
|
@@ -3317,6 +3379,28 @@
|
|
| 3317 |
presenceModels.push(element);
|
| 3318 |
}
|
| 3319 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3320 |
function filterByType(element) {
|
| 3321 |
const mode = document.getElementById('searchMode').value;
|
| 3322 |
const filters = [
|
|
@@ -3394,6 +3478,10 @@
|
|
| 3394 |
|
| 3395 |
// Filter by search term and type
|
| 3396 |
let filtered = presenceModels.filter((element) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3397 |
return (
|
| 3398 |
(element.key.toLowerCase().includes(lowerCaseValue) || value === '*') &&
|
| 3399 |
filterByType(element)
|
|
|
|
| 336 |
font-size: 16px;
|
| 337 |
}
|
| 338 |
|
| 339 |
+
.multi-lora-toggle-wrap {
|
| 340 |
+
display: flex;
|
| 341 |
+
align-items: center;
|
| 342 |
+
gap: 8px;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
.multi-lora-toggle-btn {
|
| 346 |
+
display: inline-flex;
|
| 347 |
+
align-items: center;
|
| 348 |
+
justify-content: center;
|
| 349 |
+
width: 44px;
|
| 350 |
+
height: 36px;
|
| 351 |
+
padding: 0;
|
| 352 |
+
background: var(--input-bg);
|
| 353 |
+
border: 2px solid var(--input-border);
|
| 354 |
+
border-radius: 10px;
|
| 355 |
+
cursor: pointer;
|
| 356 |
+
transition: all 0.2s;
|
| 357 |
+
position: relative;
|
| 358 |
+
font-size: 20px;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
.multi-lora-toggle-btn:hover {
|
| 362 |
+
background: var(--hover-bg);
|
| 363 |
+
border-color: var(--accent-blue);
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
.multi-lora-toggle-btn.active {
|
| 367 |
+
background: rgba(96, 165, 250, 0.2);
|
| 368 |
+
border-color: var(--accent-blue);
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
.multi-lora-toggle-btn .multi-lora-icon {
|
| 372 |
+
position: absolute;
|
| 373 |
+
transition: opacity 0.2s;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
.multi-lora-toggle-btn .multi-lora-icon.off {
|
| 377 |
+
opacity: 1;
|
| 378 |
+
}
|
| 379 |
+
|
| 380 |
+
.multi-lora-toggle-btn .multi-lora-icon.on {
|
| 381 |
+
opacity: 0;
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
.multi-lora-toggle-btn.active .multi-lora-icon.off {
|
| 385 |
+
opacity: 0;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
.multi-lora-toggle-btn.active .multi-lora-icon.on {
|
| 389 |
+
opacity: 1;
|
| 390 |
+
}
|
| 391 |
+
|
| 392 |
.mainContent {
|
| 393 |
max-width: 1400px;
|
| 394 |
margin: 0 auto;
|
|
|
|
| 1912 |
<option value="all">All</option>
|
| 1913 |
</select>
|
| 1914 |
</div>
|
| 1915 |
+
|
| 1916 |
+
<div class="control-group multi-lora-toggle-wrap">
|
| 1917 |
+
<span class="control-label">MultiLora:</span>
|
| 1918 |
+
<button type="button" id="multiLoraToggleBtn" class="multi-lora-toggle-btn" title="Show only models that have more than one lora version in a single category" onclick="toggleMultiLora();">
|
| 1919 |
+
<span class="multi-lora-icon off">📖</span>
|
| 1920 |
+
<span class="multi-lora-icon on">📚</span>
|
| 1921 |
+
</button>
|
| 1922 |
+
</div>
|
| 1923 |
</div>
|
| 1924 |
|
| 1925 |
<div class="controls" style="margin-top: 16px;">
|
|
|
|
| 2221 |
let currentPage = 1;
|
| 2222 |
let totalPages = 1;
|
| 2223 |
let filteredResults = [];
|
| 2224 |
+
let isMultiLoraEnabled = false;
|
| 2225 |
|
| 2226 |
// Upload data (from data-hf-uploaded.js)
|
| 2227 |
const uploadData = {
|
|
|
|
| 3379 |
presenceModels.push(element);
|
| 3380 |
}
|
| 3381 |
|
| 3382 |
+
function hasMultiLoraForTypes(personKey, types) {
|
| 3383 |
+
const personData = uploadData.data[personKey];
|
| 3384 |
+
if (!personData || !personData.models) return false;
|
| 3385 |
+
|
| 3386 |
+
const allTypes = ['locon', 'lora', 'embedding', 'flux', 'wan', 'sdxl', 'ltx', 'qwen', 'zimage', 'zbase', 'klein9'];
|
| 3387 |
+
const typesToCheck = types && types.length > 0 ? types : allTypes;
|
| 3388 |
+
|
| 3389 |
+
for (const modelType of typesToCheck) {
|
| 3390 |
+
const arr = personData.models[modelType];
|
| 3391 |
+
if (Array.isArray(arr) && arr.length > 1) return true;
|
| 3392 |
+
}
|
| 3393 |
+
return false;
|
| 3394 |
+
}
|
| 3395 |
+
|
| 3396 |
+
function toggleMultiLora() {
|
| 3397 |
+
isMultiLoraEnabled = !isMultiLoraEnabled;
|
| 3398 |
+
const btn = document.getElementById('multiLoraToggleBtn');
|
| 3399 |
+
if (btn) btn.classList.toggle('active', isMultiLoraEnabled);
|
| 3400 |
+
resetToFirstPage();
|
| 3401 |
+
searchModels(getCurrentSearchValue());
|
| 3402 |
+
}
|
| 3403 |
+
|
| 3404 |
function filterByType(element) {
|
| 3405 |
const mode = document.getElementById('searchMode').value;
|
| 3406 |
const filters = [
|
|
|
|
| 3478 |
|
| 3479 |
// Filter by search term and type
|
| 3480 |
let filtered = presenceModels.filter((element) => {
|
| 3481 |
+
if (isMultiLoraEnabled) {
|
| 3482 |
+
const typesToCheck = selectedTypes.length > 0 ? selectedTypes : null;
|
| 3483 |
+
if (!hasMultiLoraForTypes(element.key, typesToCheck)) return false;
|
| 3484 |
+
}
|
| 3485 |
return (
|
| 3486 |
(element.key.toLowerCase().includes(lowerCaseValue) || value === '*') &&
|
| 3487 |
filterByType(element)
|