Skip to content

Commit b247581

Browse files
committed
fix: insufficient memory error on macOS
1 parent bb3f19c commit b247581

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stable-diffusion.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,8 +3222,8 @@ class StableDiffusionGGML {
32223222

32233223
struct ggml_tensor* hidden_states = cond_stage_model.text_model.forward(ctx, input_ids);
32243224

3225-
struct ggml_cgraph* cond_graph = ggml_build_forward_ctx(ctx, hidden_states);
3226-
struct ggml_cplan cplan = ggml_graph_plan(cond_graph, n_threads);
3225+
struct ggml_cgraph cond_graph = ggml_build_forward(hidden_states);
3226+
struct ggml_cplan cplan = ggml_graph_plan(&cond_graph, n_threads);
32273227
ctx_size += cplan.work_size;
32283228

32293229
ctx_size += ggml_used_mem(ctx) + ggml_used_mem_of_data(ctx);

0 commit comments

Comments
 (0)