mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
refactor: manage upscaler params through model manager (#1645)
This commit is contained in:
1 parent
563137a592
commit
9b0fceb41b
8 files changed
+327
-361
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user