Skip to content

Commit

Permalink
Fix build + add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
stduhpf committed Dec 13, 2024
1 parent f80ce5e commit dd25743
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions stable-diffusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,10 +780,10 @@ class StableDiffusionGGML {
sd_preview_policy_t preview_mode,
ggml_tensor* result,
std::function<void(int, sd_image_t)> step_callback) {
const size_t channel = 3;
size_t width = latents->ne[0];
size_t height = latents->ne[1];
size_t dim = latents->ne[2];
const uint32_t channel = 3;
uint32_t width = latents->ne[0];
uint32_t height = latents->ne[1];
uint32_t dim = latents->ne[2];
if (preview_mode == SD_PREVIEW_PROJ) {
const float(*latent_rgb_proj)[channel];

Expand All @@ -795,6 +795,7 @@ class StableDiffusionGGML {
} else if (sd_version_is_flux(version)) {
latent_rgb_proj = flux_latent_rgb_proj;
} else {
LOG_WARN("No latent to RGB projection known for this model");
// unknown model
return;
}
Expand All @@ -807,9 +808,11 @@ class StableDiffusionGGML {
latent_rgb_proj = sd_latent_rgb_proj;
} else {
// unknown model
LOG_WARN("No latent to RGB projection known for this model");
return;
}
} else {
LOG_WARN("No latent to RGB projection known for this model");
// unknown latent space
return;
}
Expand Down

0 comments on commit dd25743

Please sign in to comment.