refactor: manage upscaler params through model manager (#1645)

This commit is contained in:
leejet authored and GitHub committed 2026-06-13 15:39:57 +08:00
1 parent 563137a592
commit 9b0fceb41b
8 files changed
+327 -361

No files matched your search

+3
View File
@@ -4,6 +4,7 @@
#include "core/ggml_extend_backend.h"
#include "core/tensor.hpp"
#include "model/upscaler/esrgan.hpp"
#include "model_manager.h"
#include "stable-diffusion.h"
#include <memory>
@@ -11,6 +12,7 @@
struct UpscalerGGML {
SDBackendManager backend_manager;
std::shared_ptr<ModelManager> model_manager;
ggml_type model_data_type = GGML_TYPE_F16;
std::shared_ptr<ESRGAN> esrgan_upscaler;
std::string esrgan_path;
@@ -27,6 +29,7 @@ struct UpscalerGGML {
int tile_size = 128,
std::string backend_spec = "",
std::string params_backend_spec = "");
~UpscalerGGML();
bool load_from_file(const std::string& esrgan_path,
bool offload_params_to_cpu,