Skip to content

Commit

Permalink
[SDXL] fix for euler_scheduler (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
likholat authored Oct 14, 2024
1 parent 3f01a95 commit 7833ed6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cpp/src/text2image/schedulers/euler_discrete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,15 @@ EulerDiscreteScheduler::EulerDiscreteScheduler(const Config& scheduler_config) :
"support.");

m_sigmas.push_back(0);

m_step_index = -1;
}

void EulerDiscreteScheduler::set_timesteps(size_t num_inference_steps) {
// TODO: support `timesteps` and `sigmas` inputs
m_timesteps.clear();
m_sigmas.clear();
m_step_index = -1;

m_num_inference_steps = num_inference_steps;
std::vector<float> sigmas;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/src/text2image/schedulers/euler_discrete.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class EulerDiscreteScheduler : public IScheduler {
std::vector<int64_t> m_timesteps;
size_t m_num_inference_steps;

size_t m_step_index = -1;
size_t m_step_index;
};

} // namespace genai
Expand Down

0 comments on commit 7833ed6

Please sign in to comment.