Skip to content

Commit

Permalink
Done not preload preview tensor when preview is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf committed Dec 13, 2024
1 parent dcb19fc commit 86450ce
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 @@ -924,7 +924,7 @@ class StableDiffusionGGML {
struct ggml_tensor* denoised = ggml_dup_tensor(work_ctx, x);

struct ggml_tensor* preview_tensor = NULL;
if (preview_mode != SD_PREVIEW_PROJ) {
if (preview_mode != SD_PREVIEW_NONE && preview_mode != SD_PREVIEW_PROJ) {
preview_tensor = ggml_new_tensor_4d(work_ctx, GGML_TYPE_F32,
(denoised->ne[0] * 8),
(denoised->ne[1] * 8),
Expand Down

0 comments on commit 86450ce

Please sign in to comment.