Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/model/diffusion/sensenova_u1.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace SenseNovaU1 {
auto x = ggml_ext_timestep_embedding(ctx->ggml_ctx,
timesteps,
static_cast<int>(frequency_embedding_size),
10000.f,
10000,
1.f);
x = mlp_0->forward(ctx, x);
x = ggml_silu_inplace(ctx->ggml_ctx, x);
Expand Down
30 changes: 15 additions & 15 deletions src/model/diffusion/wan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ namespace WAN {
constexpr int WAN_GRAPH_SIZE = 10240;

struct WanConfig {
std::string model_type = "t2v";
std::tuple<int, int, int> patch_size = {1, 2, 2};
int64_t text_len = 512;
int64_t in_dim = 16;
int64_t dim = 2048;
int64_t ffn_dim = 8192;
int freq_dim = 256;
int64_t text_dim = 4096;
int64_t out_dim = 16;
int64_t num_heads = 16;
int num_layers = 32;
int vace_layers = 0;
int64_t vace_in_dim = 96;
std::map<int, int> vace_layers_mapping = {};
std::string model_type = "t2v";
std::tuple<int, int, int> patch_size = {1, 2, 2};
int64_t text_len = 512;
int64_t in_dim = 16;
int64_t dim = 2048;
int64_t ffn_dim = 8192;
int freq_dim = 256;
int64_t text_dim = 4096;
int64_t out_dim = 16;
int64_t num_heads = 16;
int num_layers = 32;
int vace_layers = 0;
int64_t vace_in_dim = 96;
std::map<int, int> vace_layers_mapping = {};
int64_t audio_dim = 1024;
int num_audio_token = 4; // excludes the learned padding token
int num_audio_token = 4; // excludes the learned padding token
std::vector<int> audio_inject_layers = {};
std::map<int, int> audio_inject_mapping = {}; // block index -> injector index
std::string adain_mode = "attn_norm";
Expand Down
2 changes: 1 addition & 1 deletion src/model/vae/tae.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class TAEHV : public GGMLBlock {
int64_t chunk_frames = 5 * decoder->t_upscale;
int64_t pad = (chunk_frames - (num_frames % chunk_frames)) % chunk_frames;

result = ggml_ext_pad_ext(ctx->ggml_ctx, ctx->backend, result, 0, 0, 0, 0, 0, 0, 0, pad, false, false);
result = ggml_ext_pad_ext(ctx->ggml_ctx, ctx->backend, result, 0, 0, 0, 0, 0, 0, 0, static_cast<int>(pad), false, false);

int64_t num_chunks = (num_frames + pad) / chunk_frames;
auto to_trim = decoder->t_upscale - 1;
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/denoiser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2789,9 +2789,9 @@ static sd::Tensor<float> sample_lms(denoise_cb_t model,
sd::Tensor<float> d_cur = (x - denoised) / sigma;
x += d_cur * lms_coeff[0];
if (max_order > 1) { // if max_order == 1, the history is not used (order always < 2)
int hist_size_p1 = hist.size() + 1;
int hist_size_p1 = static_cast<int>(hist.size()) + 1;
if (i) { // history does not exist at 1st step
int hist_max = hist.size() - 1;
int hist_max = static_cast<int>(hist.size()) - 1;
for (int c = 2; c <= order; c++)
x += hist[std::min(hist_max, hist_size_p1 - c + shift)] * lms_coeff[c - 1];
// max_order == 4 => hist[] index = 2, 1, 0
Expand Down
Loading