feat: hide Nunchaku reference models on non-CUDA backends

Filter out reference entries tagged "nunchaku" from Extra Networks
when the active backend is not CUDA, since Nunchaku requires NVIDIA
GPUs. Entries remain in shared.reference_models for programmatic
lookup but are not yielded to the UI.
This commit is contained in:
CalamitousFelicitousness
2026-02-06 00:10:18 +00:00
parent a2ee885e28
commit c8597ca84e
+4 -1
View File
@@ -3,7 +3,7 @@ import html
import json
import concurrent
from datetime import datetime
from modules import shared, ui_extra_networks, sd_models, modelstats, paths
from modules import shared, ui_extra_networks, sd_models, modelstats, paths, devices
from modules.json_helpers import readfile
@@ -88,6 +88,9 @@ class ExtraNetworksPageCheckpoints(ui_extra_networks.ExtraNetworksPage):
path = f'{v.get("path", "")}'
tag = v.get('tags', '')
if tag == 'nunchaku' and devices.backend != 'cuda':
count['hidden'] += 1
continue
if tag in count:
count[tag] += 1
elif tag != '':