From 3370683c6f52dfd16ab67a302f12cfa7b3905ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20du=20Hamel?= Date: Thu, 24 Oct 2024 18:37:23 +0200 Subject: [PATCH] Server: sd3.5 --- examples/server/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/server/main.cpp b/examples/server/main.cpp index 4dfdf1bf..5e7868b2 100644 --- a/examples/server/main.cpp +++ b/examples/server/main.cpp @@ -66,6 +66,7 @@ struct SDParams { // models std::string model_path; std::string clip_l_path; + std::string clip_g_path; std::string t5xxl_path; std::string diffusion_model_path; std::string vae_path; @@ -116,6 +117,7 @@ void print_params(SDParams params) { printf(" model_path: %s\n", params.model_path.c_str()); printf(" wtype: %s\n", params.wtype < SD_TYPE_COUNT ? sd_type_name(params.wtype) : "unspecified"); printf(" clip_l_path: %s\n", params.clip_l_path.c_str()); + printf(" clip_g_path: %s\n", params.clip_g_path.c_str()); printf(" t5xxl_path: %s\n", params.t5xxl_path.c_str()); printf(" diffusion_model_path: %s\n", params.diffusion_model_path.c_str()); printf(" vae_path: %s\n", params.vae_path.c_str()); @@ -156,6 +158,7 @@ void print_usage(int argc, const char* argv[]) { printf(" -m, --model [MODEL] path to full model\n"); printf(" --diffusion-model path to the standalone diffusion model\n"); printf(" --clip_l path to the clip-l text encoder\n"); + printf(" --clip_g path to the clip-g text encoder\n"); printf(" --t5xxl path to the the t5xxl text encoder.\n"); printf(" --vae [VAE] path to vae\n"); printf(" --embd-dir [EMBEDDING_PATH] path to embeddings.\n"); @@ -214,6 +217,12 @@ void parse_args(int argc, const char** argv, SDParams& params) { break; } params.clip_l_path = argv[i]; + } else if (arg == "--clip_g") { + if (++i >= argc) { + invalid_arg = true; + break; + } + params.clip_g_path = argv[i]; } else if (arg == "--t5xxl") { if (++i >= argc) { invalid_arg = true; @@ -716,6 +725,7 @@ int main(int argc, const char* argv[]) { sd_ctx_t* sd_ctx = new_sd_ctx(params.model_path.c_str(), params.clip_l_path.c_str(), + params.clip_g_path.c_str(), params.t5xxl_path.c_str(), params.diffusion_model_path.c_str(), params.vae_path.c_str(),