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.
This commit is contained in:
FearL0rd
2026-01-30 07:32:17 -06:00
committed by GitHub
parent 41bbd4079f
commit 6c9af0ff02
+4 -3
View File
@@ -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):