Skip to content

synth: fail the job on latents or audio that are not finite instead of writing silence - #128

Open
timoncool wants to merge 1 commit into
ServeurpersoCom:masterfrom
timoncool:nonfinite-output
Open

timoncool wants to merge 1 commit into
ServeurpersoCom:masterfrom
timoncool:nonfinite-output

Conversation

@timoncool

Copy link
Copy Markdown

The audio writers coerce NaN and Inf to zero (audio-io.h). When the DiT or the VAE produces values that are not numbers, the track therefore comes out as silence: the job is reported done, nothing is logged, and a client only sees a silent file. A studio that checks its output reports "silence" with no stage to look at.

  • After the DiT, the latents are checked. If any value is not finite, the job fails with [DiT-Generate] ERROR: N of M latent values are not finite (NaN or Inf).
  • After each VAE decode, the samples are checked. If any is not finite, that track gets the same [VAE-Decode BatchN] ERROR: … line, and the job fails (ops_vae_decode returns -1, and the server frees the other tracks as it does on any failure).
  • A normal job is unchanged. The checks are one pass over data that is already on the CPU.

Checked on a CPU build. A synth request with latent_rescale: 1e30 (finite latents, the VAE overflows) used to give a silent track. It now ends failed with [VAE-Decode Batch0] ERROR: 921600 of 921600 samples are not finite (NaN or Inf). Normal 10-second jobs on CUDA and CPU still finish with audio.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4c65e91d-f2eb-46e1-9ef7-031ce8cf031d
Commits

Reviewing files that changed from the base of the PR and between de858d8 and 22cf6f6.

Files selected for processing: 1
  • src/pipeline-synth-ops.cpp
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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