[Enhancement] Add force_refresh support for GLM-Image for cache-dit 1.3.0 upgrade (#1858)

Signed-off-by: samithuang <285365963@qq.com>
Signed-off-by: Samit <285365963@qq.com>
Signed-off-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
Co-authored-by: Didan Deng <33117903+wtomin@users.noreply.github.com>
This commit is contained in:
SamitandDidan Deng authored and GitHub committed 2026-03-24 14:32:18 +08:00
1 parent b2b061a9b3
commit 9ead0d890d
3 files changed
+72

No files matched your search

+6
View File
@@ -264,6 +264,12 @@ class DiffusionCacheConfig:
# Used by cache-dit for scm mask generation. If this value changes during inference,
# we will re-generate the scm mask and refresh the cache context.
num_inference_steps: int | None = None
# Force refresh the cache at a specific step index hint, useful for models like
# GLM-Image (image preprocessing step in editing mode).
force_refresh_step_hint: int | None = None
# Policy for force refresh: "once" refreshes only at the hint step,
# "repeat" refreshes every force_refresh_step_hint steps.
force_refresh_step_policy: str = "once"
# Additional parameters that may be passed but not explicitly defined
_extra_params: dict[str, Any] = field(default_factory=dict, repr=False)