mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
refactor: make_hires_sigma_schedule() simplification (#2244)
This commit is contained in:
1 parent
8ee08e3cb9
commit
997478a4cb
1 file changed
+1
-5
@@ -519,14 +519,10 @@ namespace sd::pipeline {
|
||||
scheduler,
|
||||
sd->version,
|
||||
sample_params.extra_sample_args);
|
||||
size_t t_enc = static_cast<size_t>(effective_steps - 1);
|
||||
if (t_enc >= static_cast<size_t>(scheduler_steps)) {
|
||||
t_enc = static_cast<size_t>(scheduler_steps) - 1;
|
||||
}
|
||||
if (scheduler_steps_out != nullptr) {
|
||||
*scheduler_steps_out = scheduler_steps;
|
||||
}
|
||||
return std::vector<float>(sigmas.begin() + scheduler_steps - static_cast<int>(t_enc) - 1,
|
||||
return std::vector<float>(sigmas.begin() + std::max(0, scheduler_steps - effective_steps),
|
||||
sigmas.end());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user