Skip to content

Commit 3370683

Browse files
committed
Server: sd3.5
1 parent 048be6a commit 3370683

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/server/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ struct SDParams {
6666
// models
6767
std::string model_path;
6868
std::string clip_l_path;
69+
std::string clip_g_path;
6970
std::string t5xxl_path;
7071
std::string diffusion_model_path;
7172
std::string vae_path;
@@ -116,6 +117,7 @@ void print_params(SDParams params) {
116117
printf(" model_path: %s\n", params.model_path.c_str());
117118
printf(" wtype: %s\n", params.wtype < SD_TYPE_COUNT ? sd_type_name(params.wtype) : "unspecified");
118119
printf(" clip_l_path: %s\n", params.clip_l_path.c_str());
120+
printf(" clip_g_path: %s\n", params.clip_g_path.c_str());
119121
printf(" t5xxl_path: %s\n", params.t5xxl_path.c_str());
120122
printf(" diffusion_model_path: %s\n", params.diffusion_model_path.c_str());
121123
printf(" vae_path: %s\n", params.vae_path.c_str());
@@ -156,6 +158,7 @@ void print_usage(int argc, const char* argv[]) {
156158
printf(" -m, --model [MODEL] path to full model\n");
157159
printf(" --diffusion-model path to the standalone diffusion model\n");
158160
printf(" --clip_l path to the clip-l text encoder\n");
161+
printf(" --clip_g path to the clip-g text encoder\n");
159162
printf(" --t5xxl path to the the t5xxl text encoder.\n");
160163
printf(" --vae [VAE] path to vae\n");
161164
printf(" --embd-dir [EMBEDDING_PATH] path to embeddings.\n");
@@ -214,6 +217,12 @@ void parse_args(int argc, const char** argv, SDParams& params) {
214217
break;
215218
}
216219
params.clip_l_path = argv[i];
220+
} else if (arg == "--clip_g") {
221+
if (++i >= argc) {
222+
invalid_arg = true;
223+
break;
224+
}
225+
params.clip_g_path = argv[i];
217226
} else if (arg == "--t5xxl") {
218227
if (++i >= argc) {
219228
invalid_arg = true;
@@ -716,6 +725,7 @@ int main(int argc, const char* argv[]) {
716725

717726
sd_ctx_t* sd_ctx = new_sd_ctx(params.model_path.c_str(),
718727
params.clip_l_path.c_str(),
728+
params.clip_g_path.c_str(),
719729
params.t5xxl_path.c_str(),
720730
params.diffusion_model_path.c_str(),
721731
params.vae_path.c_str(),

0 commit comments

Comments
 (0)