Skip to content

Commit f2cc8bb

Browse files
committed
fix sample params initialization
1 parent 50f9211 commit f2cc8bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stable-diffusion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,6 +1621,7 @@ char* sd_ctx_params_to_str(const sd_ctx_params_t* sd_ctx_params) {
16211621
}
16221622

16231623
void sd_sample_params_init(sd_sample_params_t* sample_params) {
1624+
memset((void*)sample_params, 0, sizeof(sd_sample_params_t));
16241625
sample_params->guidance.txt_cfg = 7.0f;
16251626
sample_params->guidance.img_cfg = INFINITY;
16261627
sample_params->guidance.distilled_guidance = 3.5f;

0 commit comments

Comments
 (0)