optimize wan performance - #154
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 141422cdf4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // the warm-up and on the final step, where the result is most | ||
| // sensitive); in between the cached d is reused and the unconditional | ||
| // pass is skipped entirely. | ||
| bool computeNeg = dCache == null || UsesUncondPass(i, steps, cfgStride); |
There was a problem hiding this comment.
Refresh the guidance cache when switching experts
With guidance caching enabled on a dual-expert A14B model, this decision ignores the high-to-low expert transition, so the first low-noise step can reuse a guidance delta produced by the entirely different high-noise network. For example, the default 40-step A14B T2V schedule switches at step index 26, while strides 2 and 3 both skip the unconditional pass there; the resulting update combines the low expert's conditional output with the high expert's cached delta (and a different CFG scale). Force a cache refresh whenever cur changes experts.
Useful? React with 👍 / 👎.
| $" ({detail}) {inPhase:F0}s in this pass, " + | ||
| $"{_total.Elapsed.TotalSeconds:F0}s total" + | ||
| (eta > 0 ? $", {WanVideoPipeline.FormatEta(eta)} left" : "")); | ||
| Report(phase, step, totalSteps, detail, eta, heartbeat: true); |
There was a problem hiding this comment.
Catch progress callback failures on timer ticks
When an OnProgress callback throws during a periodic heartbeat—for example, because its UI target was disposed—this call runs directly on a System.Threading.Timer thread with no surrounding task or exception handler. On modern .NET an unhandled ThreadPool exception can terminate the entire host process, rather than merely failing the current generation as the synchronous progress calls do. Catch observer exceptions around the timer-driven report or otherwise marshal them back to the generation operation.
Useful? React with 👍 / 👎.
No description provided.