From 32c2c236ebb67490a4bb931d3b05d7a9117530c2 Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Sun, 28 Dec 2025 19:23:00 +0800 Subject: [PATCH] fix: debug model structure and force mel_fn move (v1.4.58) --- aiia_audio_enhance.py | 17 ++++++++++++++--- pyproject.toml | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/aiia_audio_enhance.py b/aiia_audio_enhance.py index 8d5792e..135d50d 100644 --- a/aiia_audio_enhance.py +++ b/aiia_audio_enhance.py @@ -359,8 +359,16 @@ class AIIA_Audio_Enhance: _cached_enhancer.to(active_device) _cached_enhancer.eval() + # DEBUG: Check model structure + if not hasattr(_cached_enhancer, "ode_solve"): + print(f"[AIIA DEBUG] Model type: {type(_cached_enhancer)}") + print(f"[AIIA DEBUG] Model dir: {dir(_cached_enhancer)}") + # Check submodules? + # Fix: Move global mel_fn if it exists (fixes 'stft input and window' error) # The library uses a global mel_fn for chunk merging, which stays on CPU by default. + + # METHOD A: Direct Import try: import resemble_enhance.inference as inference_mod_inner if hasattr(inference_mod_inner, "mel_fn") and hasattr(inference_mod_inner.mel_fn, "to"): @@ -368,10 +376,13 @@ class AIIA_Audio_Enhance: except: pass + # METHOD B: Sys Modules (Stronger) try: - import resemble_enhance.audio as audio_mod - if hasattr(audio_mod, "mel_fn") and hasattr(audio_mod.mel_fn, "to"): - audio_mod.mel_fn.to(active_device) + import sys + if "resemble_enhance.audio" in sys.modules: + mod = sys.modules["resemble_enhance.audio"] + if hasattr(mod, "mel_fn"): + mod.mel_fn.to(active_device) except: pass diff --git a/pyproject.toml b/pyproject.toml index ef2ce7f..c02976a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "aiia" description = "A suite of powerful, intuitive, and highly customizable nodes for ComfyUI, featuring a high-performance Media Browser and OOM-safe video tools." -version = "1.4.57" +version = "1.4.58" license = {file = "LICENSE"} readme = "README.md" authors = [