Skip to content

Commit cbc387e

Browse files
committed
refactor: simplified GITSSchedule
Removed a useless check.
1 parent 9b98993 commit cbc387e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

denoiser.hpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -229,17 +229,10 @@ struct GITSSchedule : SigmaSchedule {
229229
}
230230

231231
std::vector<float> sigmas;
232+
int idx = static_cast<int>(std::round(1.20f * 10)) - 8; // Example adjustment for coefficient 1.20
232233
if (n <= 20) {
233-
int idx = static_cast<int>(std::round(1.20f * 10)) - 8; // Example adjustment for coefficient 1.20
234-
if (idx < 0 || idx >= GITS_NOISE.size()) {
235-
throw std::out_of_range("Coefficient index out of range.");
236-
}
237234
sigmas = GITS_NOISE[idx][n - 2];
238235
} else {
239-
int idx = static_cast<int>(std::round(1.20f * 10)) - 8; // Example adjustment for coefficient 1.20
240-
if (idx < 0 || idx >= GITS_NOISE.size()) {
241-
throw std::out_of_range("Coefficient index out of range.");
242-
}
243236
sigmas = GITS_NOISE[idx].back();
244237
sigmas = log_linear_interp(sigmas, n + 1);
245238
}

0 commit comments

Comments
 (0)