mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
feat(server): accept ref_videos, ref_audios, ref_video_audios in sdcpp vid_gen (#2194)
This commit is contained in:
1 parent
bb6a0ccfa3
commit
0f76bf5c1e
8 files changed
+185
-50
No files matched your search
@@ -212,11 +212,15 @@ static json make_img_gen_features_json() {
|
||||
};
|
||||
}
|
||||
|
||||
/** Builds the default feature set advertised for vid_gen requests. */
|
||||
static json make_vid_gen_features_json() {
|
||||
return {
|
||||
{"init_image", true},
|
||||
{"end_image", true},
|
||||
{"control_frames", true},
|
||||
{"ref_videos", true},
|
||||
{"ref_audios", true},
|
||||
{"ref_video_audios", true},
|
||||
{"high_noise_sample_params", true},
|
||||
{"lora", true},
|
||||
{"vae_tiling", true},
|
||||
@@ -235,6 +239,7 @@ static json make_preview_modes_json() {
|
||||
return modes;
|
||||
}
|
||||
|
||||
/** Builds the /capabilities payload: model, defaults, limits and feature maps. */
|
||||
static json make_capabilities_json(ServerRuntime& runtime) {
|
||||
refresh_lora_cache(runtime);
|
||||
refresh_upscaler_cache(runtime);
|
||||
@@ -351,8 +356,10 @@ static json make_capabilities_json(ServerRuntime& runtime) {
|
||||
const json generation_features = model_generation_features(runtime);
|
||||
auto recipe_features = [&](json features, bool video) {
|
||||
features["init_image"] = generation_features.at(video ? "init_image" : "img2img");
|
||||
for (const char* key : {"mask_image", "ref_images", "end_image", "control_frames", "lora", "vae_tiling", "cache", "preview"}) {
|
||||
if (features.contains(key) || std::string(key) == "ref_images")
|
||||
for (const char* key : {"mask_image", "ref_images", "end_image", "control_frames", "ref_videos", "ref_audios", "ref_video_audios", "lora", "vae_tiling", "cache", "preview"}) {
|
||||
if (features.contains(key) || std::string(key) == "ref_images" ||
|
||||
(video && (std::string(key) == "ref_videos" || std::string(key) == "ref_audios" ||
|
||||
std::string(key) == "ref_video_audios")))
|
||||
features[key] = generation_features.at(key);
|
||||
}
|
||||
if (video)
|
||||
|
||||
Reference in new issue
Block a user