Clamp temperature to >=1.0 for Dia generation #43029
Open
+5
−0
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.
Clamp temperature to ≥ 1.0 to fix noise in Dia generation
What does this PR do?
This PR clamps the
temperatureparameter to a minimum value of1.0during Dia model generation.The change aligns the Transformers implementation with the original Dia reference configuration and the Nari Labs demo UI, where the temperature slider does not allow values below
1.0. Allowingtemperature < 1.0was found to produce unstable and noisy audio outputs, and in some cases could lead to generation failures.By enforcing a lower bound of
1.0, this PR:This is a non-breaking change: values below
1.0are silently clamped to1.0.Fixes #43016
Before submitting
→ Dia model cannot load/ generation error #43016
Not applicable — behavior matches upstream reference implementation.
Not added — this is a behavioral clamp and existing coverage is sufficient.
Who can review?
This change affects audio models and generation logic.
Tagging the following reviewers:
Library:
Integrations:
Devices/Backends:
Documentation: @stevhliu
Research projects are not maintained and should be taken as is.
-->