mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
feat: add custom modulate operator and ConvRot fusion (#2258)
This commit is contained in:
1 parent
133087deb8
commit
290148d2e3
36 files changed
+655
-161
No files matched your search
@@ -445,9 +445,7 @@ namespace MiniMaxH3 {
|
||||
inputs.push_back(ggml_ext_slice(ctx->ggml_ctx, x, 1, segment.start, segment.end, false));
|
||||
}
|
||||
auto modulate = [&](ggml_tensor* value, const std::vector<ggml_tensor*>& row, int shift, int scale) {
|
||||
return ggml_add(ctx->ggml_ctx,
|
||||
ggml_add(ctx->ggml_ctx, value, ggml_mul(ctx->ggml_ctx, value, row[scale])),
|
||||
row[shift]);
|
||||
return ggml_ext_modulate(ctx, value, row[shift], row[scale]);
|
||||
};
|
||||
ggml_tensor* qkv = nullptr;
|
||||
for (size_t i = 0; i < segments.size(); ++i) {
|
||||
|
||||
Reference in new issue
Block a user