From b83f77a75b1cedb8eb3816a5023922ffda7e37f6 Mon Sep 17 00:00:00 2001 From: Hawk Lee Date: Sun, 28 Dec 2025 20:29:05 +0800 Subject: [PATCH] fix: use object.__setattr__ to bypass frozen dataclass check for quality settings (v1.4.67) --- aiia_audio_enhance.py | 12 +++++++++--- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/aiia_audio_enhance.py b/aiia_audio_enhance.py index d9ebbed..06557f8 100644 --- a/aiia_audio_enhance.py +++ b/aiia_audio_enhance.py @@ -367,9 +367,15 @@ class AIIA_Audio_Enhance: # Also inject into .hp (HyperParameters) if available if hasattr(_cached_enhancer, "hp"): - _cached_enhancer.hp.nfe = nfe - _cached_enhancer.hp.solver = solver.lower() - _cached_enhancer.hp.tau = tau + try: + # Fix FrozenInstanceError: .hp is a frozen dataclass + object.__setattr__(_cached_enhancer.hp, 'nfe', nfe) + object.__setattr__(_cached_enhancer.hp, 'solver', solver.lower()) + object.__setattr__(_cached_enhancer.hp, 'tau', tau) + except Exception as e: + print(f"[AIIA] Warning: Failed to force set hp params: {e}") + # Fallback: Maybe replace hp? + pass # Also inject directly (just in case) _cached_enhancer.nfe = nfe diff --git a/pyproject.toml b/pyproject.toml index 5c3637f..e3d1192 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.66" +version = "1.4.67" license = {file = "LICENSE"} readme = "README.md" authors = [