From 9b864b987bee7d498ab00eeed5dd973de33f062a Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Thu, 4 Sep 2025 16:20:44 +0300 Subject: [PATCH] Don't error even if redundant offloading is enabled for single text encode --- nodes.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nodes.py b/nodes.py index 6471d57..d2027d6 100644 --- a/nodes.py +++ b/nodes.py @@ -547,10 +547,13 @@ class WanVideoTextEncodeSingle: raise ValueError("No cached text embeds found for prompts, please provide a T5 encoder.") if encoded is None: - if model_to_offload is not None and device == "gpu": - log.info(f"Moving video model to {offload_device}") - model_to_offload.model.to(offload_device) - mm.soft_empty_cache() + try: + if model_to_offload is not None and device == "gpu": + log.info(f"Moving video model to {offload_device}") + model_to_offload.model.to(offload_device) + mm.soft_empty_cache() + except: + pass encoder = t5["model"] dtype = t5["dtype"]