Skip to content

Commit

Permalink
fix: avoid sd2((non inpaint) crash on v-pred check (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf authored Jan 18, 2025
1 parent 4fe83d5 commit 587a37b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stable-diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,9 @@ class StableDiffusionGGML {
ggml_set_f32(timesteps, 999);

struct ggml_tensor* concat = is_inpaint ? ggml_new_tensor_4d(work_ctx, GGML_TYPE_F32, 8, 8, 5, 1) : NULL;
ggml_set_f32(concat, 0);
if (concat != NULL) {
ggml_set_f32(concat, 0);
}

int64_t t0 = ggml_time_ms();
struct ggml_tensor* out = ggml_dup_tensor(work_ctx, x_t);
Expand Down

0 comments on commit 587a37b

Please sign in to comment.