fix(ui): string-valued input_sr combo so the arrows cycle correctly

Integer-valued combos break ComfyUI's arrow navigation: indexOf(value) fails
on the int/serialized-value mismatch, returns -1, and the widget snaps to
index 0 (8000) every click. Use string options ("8000".."24000"); the code
already does int(input_sr) everywhere, so behavior is unchanged. Updated the
example workflows' widgets_values to strings to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 12:22:19 +02:00
parent 94178a4851
commit 0e036b34d9
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -118,8 +118,8 @@ class UniverSRSampler:
"required": {
"audio": ("AUDIO", {}),
"model": ("UNIVERSR_MODEL", {}),
"input_sr": ([8000, 12000, 16000, 24000], {
"default": 8000,
"input_sr": (["8000", "12000", "16000", "24000"], {
"default": "8000",
"tooltip": "Effective input bandwidth (Hz). Content is treated as valid up to "
"input_sr/2 and regenerated above it. 8000 = genuine low-rate audio "
"(strongest, 8 kHz->48 kHz). 16000 = brighten muffled audio above 8 kHz.",