Update common.cpp

Add the ability to specify --image multiple times
This commit is contained in:
cpumaxx 2024-04-05 11:19:30 -07:00 committed by GitHub
parent 2cc1b8cd31
commit 55ef24a341
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -768,7 +768,11 @@ bool gpt_params_find_arg(int argc, char ** argv, const std::string & arg, gpt_pa
invalid_param = true;
return true;
}
params.image = argv[i];
if (params.image != "") {
params.image += ",";
}
params.image += argv[i];
params.image = std::regex_replace(params.image,std::regex(" --image "), ",");
return true;
}
if (arg == "-i" || arg == "--interactive") {