Update common.cpp

update image flag processing code to work with vector type
This commit is contained in:
cpumaxx 2024-04-09 21:03:11 -07:00 committed by GitHub
parent 7e1b9e0b70
commit 124e259dc6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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