mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-28 19:16:33 +00:00
refactor: make_hires_sigma_schedule() simplification (#2244)
This commit is contained in:
parent
8ee08e3cb9
commit
997478a4cb
1 changed files with 1 additions and 5 deletions
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue