Fix: Update cache breaking logic in IS_CHANGED from NaN to time.time()
This resolves aggressive caching bugs in newer ComfyUI versions.
Replaced float("NaN") with time.time() in image.py and loop.py
to ensure stateful memory/trigger nodes consistently fire.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import time
|
||||
import random
|
||||
import numpy as np
|
||||
import torch
|
||||
@@ -43,7 +44,7 @@ class SessionImageReceiver:
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(cls, **kwargs):
|
||||
return float("NaN")
|
||||
return time.time() # Garantiza 100% una ruptura de caché
|
||||
|
||||
def get_image(self, initial_image, current_loop_index):
|
||||
global global_session_image
|
||||
@@ -84,7 +85,7 @@ class SessionImageSender:
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(cls, **kwargs):
|
||||
return float("NaN")
|
||||
return time.time() # Garantiza 100% una ruptura de caché
|
||||
|
||||
def set_image(self, generated_images):
|
||||
global global_session_image
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import time
|
||||
import urllib.request
|
||||
import json
|
||||
from . import register_node
|
||||
@@ -23,7 +24,7 @@ class SequentialLoopStart:
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(cls, **kwargs):
|
||||
return float("NaN") # Forzamos ejecución siempre
|
||||
return time.time() # Garantiza 100% una ruptura de caché
|
||||
|
||||
def get_index(self, reset_loop):
|
||||
global global_loop_index
|
||||
@@ -68,7 +69,7 @@ class SequentialLoopTrigger:
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(cls, **kwargs):
|
||||
return float("NaN")
|
||||
return time.time() # Garantiza 100% una ruptura de caché
|
||||
|
||||
def trigger_next(self, trigger_dependency, target_loops, port, prompt=None, extra_pnginfo=None):
|
||||
global global_loop_index
|
||||
|
||||
Reference in New Issue
Block a user