Skip to content

Commit

Permalink
Increase context memory when previewing with auto encoder instead
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf committed Dec 14, 2024
1 parent 2a23987 commit e673fb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stable-diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
if (sd_ctx->sd->stacked_id) {
params.mem_size += static_cast<size_t>(10 * 1024 * 1024); // 10 MB
}
if (sd_ctx->sd->first_stage_model != nullptr && sd_ctx->sd->tae_first_stage != nullptr) {
if (preview_mode!=SD_PREVIEW_NONE && preview_mode!=SD_PREVIEW_PROJ) {
params.mem_size *= 2;
}
params.mem_size += width * height * 3 * sizeof(float);
Expand Down

0 comments on commit e673fb5

Please sign in to comment.