feat: implement ESRGAN upscaler + Metal Backend (#104)

* add esrgan upscaler

* add sd_tiling

* support metal backend

* add clip_skip

---------

Co-authored-by: leejet <leejet714@gmail.com>
This commit is contained in:
Steward Garciaandleejet authored and GitHub committed 2023-12-28 23:46:48 +08:00
1 parent 0e64238e4c
commit 004dfbef27
8 files changed
+915 -39

No files matched your search

+5 -1
View File
@@ -4,6 +4,7 @@
#include <memory>
#include <string>
#include <vector>
#include "ggml/ggml.h"
#include "ggml/ggml.h"
@@ -41,14 +42,17 @@ public:
StableDiffusion(int n_threads = -1,
bool vae_decode_only = false,
std::string taesd_path = "",
std::string esrgan_path = "",
bool free_params_immediately = false,
bool vae_tiling = false,
std::string lora_model_dir = "",
RNGType rng_type = STD_DEFAULT_RNG);
bool load_from_file(const std::string& model_path,
const std::string& vae_path,
ggml_type wtype,
Schedule d = DEFAULT);
Schedule d = DEFAULT,
int clip_skip = -1);
std::vector<uint8_t*> txt2img(
std::string prompt,