mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-06-24 23:26:43 +00:00
update scale value
This commit is contained in:
parent
14d7e4f042
commit
6e25a18394
@ -3380,10 +3380,10 @@ public:
|
|||||||
forward_params.linear.scale = scale;
|
forward_params.linear.scale = scale;
|
||||||
out = ctx->weight_adapter->forward_with_lora(ctx->ggml_ctx, ctx->backend, x, w, linear_bias, prefix, forward_params);
|
out = ctx->weight_adapter->forward_with_lora(ctx->ggml_ctx, ctx->backend, x, w, linear_bias, prefix, forward_params);
|
||||||
} else {
|
} else {
|
||||||
out = ggml_ext_linear(ctx->ggml_ctx, x, w, linear_bias, force_prec_f32, 1 / 128.f);
|
out = ggml_ext_linear(ctx->ggml_ctx, x, w, linear_bias, force_prec_f32, scale);
|
||||||
}
|
}
|
||||||
if (has_weight_scale) {
|
if (has_weight_scale) {
|
||||||
out = ggml_mul(ctx->ggml_ctx, out, params["weight_scale"]);
|
out = ggml_mul(ctx->ggml_ctx, out, params["weight_scale"]);
|
||||||
if (b != nullptr) {
|
if (b != nullptr) {
|
||||||
out = ggml_add_inplace(ctx->ggml_ctx, out, b);
|
out = ggml_add_inplace(ctx->ggml_ctx, out, b);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -181,7 +181,7 @@ namespace Ideogram4 {
|
|||||||
q = norm_q->forward(ctx, q);
|
q = norm_q->forward(ctx, q);
|
||||||
k = norm_k->forward(ctx, k);
|
k = norm_k->forward(ctx, k);
|
||||||
|
|
||||||
x = Rope::attention(ctx, q, k, v, pe, mask, 1.f / std::sqrt(static_cast<float>(head_dim)), false);
|
x = Rope::attention(ctx, q, k, v, pe, mask, 1.f / 128.f, false);
|
||||||
x = out_proj->forward(ctx, x);
|
x = out_proj->forward(ctx, x);
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user