From 6c9af0ff029bbae92d53ee737b97aea250e24bc3 Mon Sep 17 00:00:00 2001 From: FearL0rd Date: Fri, 30 Jan 2026 07:32:17 -0600 Subject: [PATCH] make 'Vae Patched' the default mode for safer decoding Updated the INPUT_TYPES definition to set "Vae Patched" as the default selection. Why: The "Original" VAE mode often causes black images or NaN errors in mixed-precision workflows (like Flux, SD3, or FP16 contexts) on certain hardware. Fix: By defaulting to "Vae Patched," the node now automatically handles precision casting (forcing Float32 when necessary) to ensure successful image decoding out of the box, while still allowing advanced users to switch back to "Original" if needed. --- any_device_offload.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/any_device_offload.py b/any_device_offload.py index cea03d4..dca3ffb 100644 --- a/any_device_offload.py +++ b/any_device_offload.py @@ -5,7 +5,7 @@ import comfy.model_management import gc import sys -# --- GLOBAL ATTENTION CONTROLLER (Preserves V17 Fixes) --- +# --- GLOBAL ATTENTION CONTROLLER --- try: import xformers.ops if not hasattr(xformers.ops, "original_memory_efficient_attention"): @@ -86,7 +86,8 @@ class AnyDeviceOffload: return { "required": { "target_device": (device_list, ), - "vae_mode": (["Original", "Vae Patched"], ), + # Swapped order: Vae Patched is now the first item (Default) + "vae_mode": (["Vae Patched", "Original"], ), "keep_in_memory": ("BOOLEAN", {"default": True}), }, "optional": { @@ -154,7 +155,7 @@ class AnyDeviceOffload: target_run_device = arg.device break - # [FIX] Scan keyword args if not found yet + # Scan keyword args if not found yet if target_run_device is None: for v in kwargs.values(): if isinstance(v, torch.Tensor):