@@ -32,72 +32,72 @@ struct logit_bias {
32
32
};
33
33
struct load_model_inputs
34
34
{
35
- const int threads;
36
- const int blasthreads;
37
- const int max_context_length;
38
- const bool low_vram;
39
- const bool use_mmq;
40
- const bool use_rowsplit;
41
- const char * executable_path;
42
- const char * model_filename;
43
- const char * lora_filename;
44
- const char * lora_base;
45
- const char * mmproj_filename;
46
- const bool use_mmap;
47
- const bool use_mlock;
48
- const bool use_smartcontext;
49
- const bool use_contextshift;
35
+ const int threads = 0 ;
36
+ const int blasthreads = 0 ;
37
+ const int max_context_length = 0 ;
38
+ const bool low_vram = 0 ;
39
+ const bool use_mmq = 0 ;
40
+ const bool use_rowsplit = 0 ;
41
+ const char * executable_path = nullptr ;
42
+ const char * model_filename = nullptr ;
43
+ const char * lora_filename = nullptr ;
44
+ const char * lora_base = nullptr ;
45
+ const char * mmproj_filename = nullptr ;
46
+ const bool use_mmap = false ;
47
+ const bool use_mlock = false ;
48
+ const bool use_smartcontext = false ;
49
+ const bool use_contextshift = false ;
50
50
const int clblast_info = 0 ;
51
51
const int cublas_info = 0 ;
52
- const char * vulkan_info;
52
+ const char * vulkan_info = nullptr ;
53
53
const int blasbatchsize = 512 ;
54
54
const int debugmode = 0 ;
55
55
const int forceversion = 0 ;
56
56
const int gpulayers = 0 ;
57
57
const float rope_freq_scale = 1 .0f ;
58
58
const float rope_freq_base = 10000 .0f ;
59
59
const bool flash_attention = false ;
60
- const float tensor_split[tensor_split_max];
60
+ const float tensor_split[tensor_split_max] = {} ;
61
61
const int quant_k = 0 ;
62
62
const int quant_v = 0 ;
63
63
};
64
64
struct generation_inputs
65
65
{
66
- const int seed;
67
- const char * prompt;
68
- const char * memory;
69
- const char * images[images_max];
70
- const int max_context_length;
71
- const int max_length;
72
- const float temperature;
73
- const int top_k;
66
+ const int seed = 0 ;
67
+ const char * prompt = nullptr ;
68
+ const char * memory = nullptr ;
69
+ const char * images[images_max] = {} ;
70
+ const int max_context_length = 0 ;
71
+ const int max_length = 0 ;
72
+ const float temperature = 0 . 0f ;
73
+ const int top_k = 0 ;
74
74
const float top_a = 0 .0f ;
75
- const float top_p;
75
+ const float top_p = 0 . 0f ;
76
76
const float min_p = 0 .0f ;
77
- const float typical_p;
78
- const float tfs;
79
- const float rep_pen;
80
- const int rep_pen_range;
77
+ const float typical_p = 0 ;
78
+ const float tfs = 0 ;
79
+ const float rep_pen = 0 ;
80
+ const int rep_pen_range = 0 ;
81
81
const float rep_pen_slope = 1 .0f ;
82
82
const float presence_penalty = 0 .0f ;
83
83
const int mirostat = 0 ;
84
- const float mirostat_eta;
85
- const float mirostat_tau;
86
- const samplers sampler_order[KCPP_SAMPLER_MAX];
87
- const int sampler_len;
88
- const bool allow_eos_token;
84
+ const float mirostat_eta = 0 . 0f ;
85
+ const float mirostat_tau = 0 . 0f ;
86
+ const samplers sampler_order[KCPP_SAMPLER_MAX] = {} ;
87
+ const int sampler_len = 0 ;
88
+ const bool allow_eos_token = false ;
89
89
const bool bypass_eos_token = false ;
90
- const bool render_special;
91
- const char * stop_sequence[stop_token_max];
92
- const bool stream_sse;
93
- const char * grammar;
94
- const bool grammar_retain_state;
90
+ const bool render_special = false ;
91
+ const char * stop_sequence[stop_token_max] = {} ;
92
+ const bool stream_sse = false ;
93
+ const char * grammar = nullptr ;
94
+ const bool grammar_retain_state = false ;
95
95
const bool quiet = false ;
96
96
const float dynatemp_range = 0 .0f ;
97
97
const float dynatemp_exponent = 1 .0f ;
98
98
const float smoothing_factor = 0 .0f ;
99
- const logit_bias logit_biases[logit_bias_max];
100
- const char * banned_tokens[ban_token_max];
99
+ const logit_bias logit_biases[logit_bias_max] = {} ;
100
+ const char * banned_tokens[ban_token_max] = {} ;
101
101
};
102
102
struct generation_outputs
103
103
{
@@ -112,31 +112,31 @@ struct token_count_outputs
112
112
};
113
113
struct sd_load_model_inputs
114
114
{
115
- const char * model_filename;
116
- const char * executable_path;
115
+ const char * model_filename = nullptr ;
116
+ const char * executable_path = nullptr ;
117
117
const int clblast_info = 0 ;
118
118
const int cublas_info = 0 ;
119
- const char * vulkan_info;
120
- const int threads;
119
+ const char * vulkan_info = nullptr ;
120
+ const int threads = 0 ;
121
121
const int quant = 0 ;
122
122
const bool taesd = false ;
123
- const char * vae_filename;
124
- const char * lora_filename;
123
+ const char * vae_filename = nullptr ;
124
+ const char * lora_filename = nullptr ;
125
125
const float lora_multiplier = 1 .0f ;
126
126
const int debugmode = 0 ;
127
127
};
128
128
struct sd_generation_inputs
129
129
{
130
- const char * prompt;
131
- const char * negative_prompt;
130
+ const char * prompt = nullptr ;
131
+ const char * negative_prompt = nullptr ;
132
132
const char * init_images = " " ;
133
- const float denoising_strength;
134
- const float cfg_scale;
135
- const int sample_steps;
136
- const int width;
137
- const int height;
138
- const int seed;
139
- const char * sample_method;
133
+ const float denoising_strength = 0 . 0f ;
134
+ const float cfg_scale = 0 . 0f ;
135
+ const int sample_steps = 0 ;
136
+ const int width = 0 ;
137
+ const int height = 0 ;
138
+ const int seed = 0 ;
139
+ const char * sample_method = nullptr ;
140
140
const int clip_skip = -1 ;
141
141
const bool quiet = false ;
142
142
};
@@ -147,17 +147,17 @@ struct sd_generation_outputs
147
147
};
148
148
struct whisper_load_model_inputs
149
149
{
150
- const char * model_filename;
151
- const char * executable_path;
150
+ const char * model_filename = nullptr ;
151
+ const char * executable_path = nullptr ;
152
152
const int clblast_info = 0 ;
153
153
const int cublas_info = 0 ;
154
- const char * vulkan_info;
154
+ const char * vulkan_info = nullptr ;
155
155
const int debugmode = 0 ;
156
156
};
157
157
struct whisper_generation_inputs
158
158
{
159
- const char * prompt;
160
- const char * audio_data;
159
+ const char * prompt = nullptr ;
160
+ const char * audio_data = nullptr ;
161
161
const bool quiet = false ;
162
162
};
163
163
struct whisper_generation_outputs
0 commit comments