Refactor: Use librosa instead of torchaudio, Add dedicated handlers for all use parameters and fix widget ordering

- Use librosa instead of torchaudio for mediaStorage
- Created dedicated toggle handlers for Image Inference, Video Inference, Upscaler, Audio Inference, Accelerator Options, Bytedance Provider Settings, and OpenAI Provider Settings
- Fixed Audio Inference widget ordering (use parameters now appear before their corresponding parameters)
- All handlers use the same proven pattern from videoInferenceDimensionsHandler
- Improved widget disabling/enabling functionality across all nodes
This commit is contained in:
Sirshendu Ganguly
2025-11-05 22:31:15 -05:00
parent b75f0803ad
commit 056ade0661
76 changed files with 2856 additions and 1606 deletions
+7 -1
View File
@@ -192,12 +192,18 @@ def setMinImageCacheSize(size: int):
os.environ["RUNWARE_MIN_IMAGE_CACHE_SIZE"] = str(size)
return True
def genRandSeed(minSeed=1000, maxSeed=9223372036854776000):
def genRandSeed(minSeed=1, maxSeed=4294967295):
"""Generate a random seed value (32-bit unsigned integer range for compatibility)"""
return random.randint(minSeed, maxSeed)
def genRandUUID():
return str(uuid.uuid4())
def getOrdinal(num):
"""Get ordinal string for number (e.g., 1 -> 'first', 2 -> 'second')"""
ordinals = {1: "first", 2: "second", 3: "third", 4: "fourth"}
return ordinals.get(num, f"{num}th")
def checkAPIKey(apiKey):
headers = {
"Accept": "application/json",