fix: return correct tuple size from predict_with_cfg zero-init early-exit#2028
Open
sajeel-haider wants to merge 1 commit into
Open
fix: return correct tuple size from predict_with_cfg zero-init early-exit#2028sajeel-haider wants to merge 1 commit into
sajeel-haider wants to merge 1 commit into
Conversation
…exit The `use_cfg_zero_star + use_zero_init` early-exit path in `predict_with_cfg` returned a 2-tuple while all callers unpack 3 values (nodes_sampler.py) or expect the cache state (skyreels/nodes.py), causing `ValueError: not enough values to unpack` on the first sampling step when both options are enabled. Pass through `cache_state`/`teacache_state` unchanged — at the zero-init step there is no cache update, so returning the input state is the correct identity behavior. Fixes kijai#2010
404e32f to
2335727
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ValueError: not enough values to unpack (expected 3, got 2)crash when bothcfg_zero_staranduse_zero_initare enabled inWanVideoExperimentalArgscache_state/teacache_stateunchanged in the zero-init early-exit path — at step 0 there is no cache update, so returning the input state is the correct identity behaviornodes_sampler.py(3-tuple callers) andskyreels/nodes.py(2-tuple callers whereNonewas returned instead of state)Changes
nodes_sampler.py(line 1185):skyreels/nodes.py(line 460):Test plan
nodes_sampler.pyunpack 3 values and all callers inskyreels/nodes.pyunpack 2 valuescfg_zero_star=True+use_zero_init=TrueFixes #2010