diff --git a/nodes_sampler.py b/nodes_sampler.py index 32b51c6a..dac368fb 100644 --- a/nodes_sampler.py +++ b/nodes_sampler.py @@ -1182,7 +1182,7 @@ def predict_with_cfg(z, cfg_scale, positive_embeds, negative_embeds, timestep, i with torch.autocast(device_type=mm.get_autocast_device(device), dtype=dtype) if autocast_enabled else nullcontext(): if use_cfg_zero_star and (idx <= zero_star_steps) and use_zero_init: - return z*0, None + return z*0, None, cache_state nonlocal patcher current_step_percentage = idx / len(timesteps) diff --git a/skyreels/nodes.py b/skyreels/nodes.py index a188edea..c41622f8 100644 --- a/skyreels/nodes.py +++ b/skyreels/nodes.py @@ -457,7 +457,7 @@ def predict_with_cfg(z, cfg_scale, positive_embeds, negative_embeds, timestep, i with torch.autocast(device_type=mm.get_autocast_device(device), dtype=dtype, enabled=("fp8" in model["quantization"])): if use_cfg_zero_star and (idx <= zero_star_steps) and use_zero_init: - return latent_model_input*0, None + return latent_model_input*0, teacache_state nonlocal patcher current_step_percentage = idx / len(init_timesteps)