fix: avoid coredump when generating large image
This commit is contained in:
parent
cf38e238d4
commit
f6ff06fcb7
2
ggml
2
ggml
@ -1 +1 @@
|
||||
Subproject commit eec8d3ca1258d1317a26fdbf561682a7dad4eb01
|
||||
Subproject commit 6958cd05c72b2c9461c8b3a270e87beff651797f
|
@ -3830,6 +3830,7 @@ std::vector<uint8_t> StableDiffusion::txt2img(const std::string& prompt,
|
||||
std::vector<uint8_t> result;
|
||||
struct ggml_init_params params;
|
||||
params.mem_size = static_cast<size_t>(10 * 1024) * 1024; // 10M
|
||||
params.mem_size += width * height * 3 * sizeof(float) * 2;
|
||||
params.mem_buffer = NULL;
|
||||
params.no_alloc = false;
|
||||
params.dynamic = false;
|
||||
|
Loading…
Reference in New Issue
Block a user