Skip to content

Commit e995b3b

Browse files
committed
fixed prediction selection logic
1 parent 1e9fd07 commit e995b3b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

examples/cli/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ const char* schedule_str[] = {
4949
};
5050

5151
const char* prediction_str[] = {
52+
"default",
5253
"eps",
5354
"v",
5455
"flow",
@@ -104,7 +105,7 @@ struct SDParams {
104105

105106
sample_method_t sample_method = EULER_A;
106107
schedule_t schedule = DEFAULT;
107-
prediction_t prediction = EPS_PRED;
108+
prediction_t prediction = DEFAULT_PRED;
108109
int sample_steps = 20;
109110
float strength = 0.75f;
110111
float control_strength = 0.9f;

stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ class StableDiffusionGGML {
423423
LOG_INFO("loading model from '%s' completed, taking %.2fs", model_path.c_str(), (t1 - t0) * 1.0f / 1000);
424424

425425

426-
if (prediction != EPS_PRED) {
426+
if (prediction != DEFAULT_PRED) {
427427
switch (prediction) {
428428
case EPS_PRED:
429429
LOG_INFO("running in eps-prediction mode");

stable-diffusion.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ enum schedule_t {
5454
};
5555

5656
enum prediction_t {
57+
DEFAULT_PRED,
5758
EPS_PRED,
5859
V_PRED,
5960
FLOW_PRED,

0 commit comments

Comments
 (0)