fix: avoid sd2((non inpaint) crash on v-pred check (#537)

This commit is contained in:
stduhpf 2025-01-18 06:13:34 +01:00 committed by GitHub
parent 4fe83d52cf
commit 587a37b2e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -606,7 +606,9 @@ public:
ggml_set_f32(timesteps, 999); 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; 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(); int64_t t0 = ggml_time_ms();
struct ggml_tensor* out = ggml_dup_tensor(work_ctx, x_t); struct ggml_tensor* out = ggml_dup_tensor(work_ctx, x_t);