mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
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:
@@ -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 != '':
|
||||
|
||||
Reference in New Issue
Block a user