refactor: centralize circular RoPE and extend image model support (#2039)

This commit is contained in:
leejet authored and GitHub committed 2026-09-24 01:45:14 +08:00
1 parent 500ef5fa7c
commit 88411ef1e0
17 files changed
+611 -564

No files matched your search

+6 -1
View File
@@ -7,7 +7,7 @@
#include "core/ggml_runner.h"
#include "core/tensor_ggml.hpp"
#include "model/common/rope.hpp"
#include "model/common/rope_circular.hpp"
#include "model_manager.h"
enum class RefImageResizeMode {
@@ -184,6 +184,11 @@ struct DiffusionModelRunner : public GGMLRunner {
protected:
std::string prefix;
std::vector<float> finish_rope_pe(Rope::Embedding embedding) {
Rope::apply_circular(embedding, circular_x_enabled, circular_y_enabled);
return std::move(embedding.values);
}
public:
DiffusionModelRunner(ggml_backend_t backend,
const std::string& prefix,