Skip to content

optimize wan performance - #154

Open
zhongkaifu wants to merge 1 commit into
mainfrom
feature/optimize_wan
Open

optimize wan performance#154
zhongkaifu wants to merge 1 commit into
mainfrom
feature/optimize_wan

Conversation

@zhongkaifu

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant