chore: silence narrowing conversion warnings (#1717)

This commit is contained in:
leejet 2026-06-28 23:14:53 +08:00 committed by GitHub
parent 7b5f34d93e
commit 9f855c933b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 19 additions and 22 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;
} }

View File

@ -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;