We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6ff06f commit 34a118dCopy full SHA for 34a118d
stable-diffusion.cpp
@@ -2659,10 +2659,19 @@ struct DiscreteSchedule {
2659
float sigmas[TIMESTEPS];
2660
float log_sigmas[TIMESTEPS];
2661
2662
- std::vector<float> get_sigmas(int n) {
+ std::vector<float> get_sigmas(uint32_t n) {
2663
std::vector<float> result;
2664
2665
int t_max = TIMESTEPS - 1;
2666
+
2667
+ if (n == 0) {
2668
+ return result;
2669
+ } else if (n == 1) {
2670
+ result.push_back(t_to_sigma(t_max));
2671
+ result.push_back(0);
2672
2673
+ }
2674
2675
float step = static_cast<float>(t_max) / static_cast<float>(n - 1);
2676
for (int i = 0; i < n; ++i) {
2677
float t = t_max - step * i;
0 commit comments