mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-06-29 09:36:40 +00:00
chore: silence narrowing conversion warnings (#1717)
This commit is contained in:
parent
7b5f34d93e
commit
9f855c933b
@ -76,8 +76,8 @@ namespace SefiImage {
|
|||||||
auto semantic_embedder = std::dynamic_pointer_cast<SefiTimestepEmbedding>(blocks["semantic_embedder"]);
|
auto semantic_embedder = std::dynamic_pointer_cast<SefiTimestepEmbedding>(blocks["semantic_embedder"]);
|
||||||
auto texture_embedder = std::dynamic_pointer_cast<SefiTimestepEmbedding>(blocks["texture_embedder"]);
|
auto texture_embedder = std::dynamic_pointer_cast<SefiTimestepEmbedding>(blocks["texture_embedder"]);
|
||||||
|
|
||||||
auto sem_proj = ggml_ext_timestep_embedding(ctx->ggml_ctx, timestep_sem, timestep_guidance_in_dim, 10000, 1.f);
|
auto sem_proj = ggml_ext_timestep_embedding(ctx->ggml_ctx, timestep_sem, (int)timestep_guidance_in_dim, 10000, 1.f);
|
||||||
auto tex_proj = ggml_ext_timestep_embedding(ctx->ggml_ctx, timestep_tex, timestep_guidance_in_dim, 10000, 1.f);
|
auto tex_proj = ggml_ext_timestep_embedding(ctx->ggml_ctx, timestep_tex, (int)timestep_guidance_in_dim, 10000, 1.f);
|
||||||
auto sem_emb = semantic_embedder->forward(ctx, sem_proj);
|
auto sem_emb = semantic_embedder->forward(ctx, sem_proj);
|
||||||
auto tex_emb = texture_embedder->forward(ctx, tex_proj);
|
auto tex_emb = texture_embedder->forward(ctx, tex_proj);
|
||||||
return ggml_concat(ctx->ggml_ctx, sem_emb, tex_emb, 0);
|
return ggml_concat(ctx->ggml_ctx, sem_emb, tex_emb, 0);
|
||||||
|
|||||||
@ -113,7 +113,6 @@ namespace WAN {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Conv2dBut3d : public Conv2d {
|
class Conv2dBut3d : public Conv2d {
|
||||||
public:
|
public:
|
||||||
using Conv2d::Conv2d;
|
using Conv2d::Conv2d;
|
||||||
@ -132,7 +131,6 @@ namespace WAN {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Resample : public GGMLBlock {
|
class Resample : public GGMLBlock {
|
||||||
protected:
|
protected:
|
||||||
int64_t dim;
|
int64_t dim;
|
||||||
|
|||||||
@ -914,7 +914,6 @@ std::string convert_diffusers_to_original_wan_vae(std::string name) {
|
|||||||
replace_with_name_map(name, resnet_name_map);
|
replace_with_name_map(name, resnet_name_map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -602,7 +602,7 @@ struct LogitNormalScheduler : SigmaScheduler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (image_seq_len > 0 && resolution_aware) {
|
if (image_seq_len > 0 && resolution_aware) {
|
||||||
mean += 0.5 * std::log(static_cast<float>(image_seq_len) / static_cast<float>(known_seq_len));
|
mean += 0.5f * std::log(static_cast<float>(image_seq_len) / static_cast<float>(known_seq_len));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -735,7 +735,7 @@ struct LogitNormalScheduler : SigmaScheduler {
|
|||||||
float t = static_cast<float>(i) / static_cast<float>(n);
|
float t = static_cast<float>(i) / static_cast<float>(n);
|
||||||
|
|
||||||
// ndtri(1-t) == -ndtri(t)
|
// ndtri(1-t) == -ndtri(t)
|
||||||
float z = -ndtri(t);
|
float z = static_cast<float>(-ndtri(t));
|
||||||
|
|
||||||
float y = mean + std * z;
|
float y = mean + std * z;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user