dynamic buffer

This commit is contained in:
RyanOnTheInside
2025-02-08 17:47:23 -05:00
parent 8e3eeebd15
commit 3db3dc3044
+7
View File
@@ -74,12 +74,19 @@ class StreamDiffusionPipeline(ControlNodeBase):
"sigmas": None,
"stock_noise": None, # For RCFG
"timesteps": None,
"current_buffer_size": None, # Track buffer size
})
# Get latent tensor from dict
samples = latents["samples"] # Shape: [1, 4, H, W]
device = samples.device
# Check if buffer size changed
if state["current_buffer_size"] != frame_buffer_size:
state["latent_buffer"] = None # Force reinitialization
state["current_buffer_size"] = frame_buffer_size
state["current_idx"] = 0
# Initialize scheduler and timesteps if needed
if state["sigmas"] is None:
# Calculate sigmas using ComfyUI's scheduler system