Skip to content

Commit 1d38c49

Browse files
stduhpfStéphane du Hamel
authored andcommitted
Increase context memory when previewing with auto encoder instead
1 parent 4adf96f commit 1d38c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ sd_image_t* txt2img(sd_ctx_t* sd_ctx,
16701670
if (sd_ctx->sd->stacked_id) {
16711671
params.mem_size += static_cast<size_t>(10 * 1024 * 1024); // 10 MB
16721672
}
1673-
if (sd_ctx->sd->first_stage_model != nullptr && sd_ctx->sd->tae_first_stage != nullptr) {
1673+
if (preview_mode!=SD_PREVIEW_NONE && preview_mode!=SD_PREVIEW_PROJ) {
16741674
params.mem_size *= 2;
16751675
}
16761676
params.mem_size += width * height * 3 * sizeof(float);

0 commit comments

Comments
 (0)