AI media harness for planning, generating, and editing locally
TypeScript
Use Viggle fixed prompt for Animate
Bitti80f7aa082028
diff --git a/docs/video-references.md b/docs/video-references.mdindex 6545380..3471473 100644--- a/docs/video-references.md+++ b/docs/video-references.md@@ -4,8 +4,10 @@Download **Animate** in Settings → Generators, then select it in the Generator.Choose a **Reference video** in the scene inspector. Animate requires a video-and sends an empty text prompt; shot descriptions, look, sound and music prompts-are not used. Video trim and soundtrack settings still come from References.+and sends Viggle's bundled [fixed prompt](https://huggingface.co/Viggle/Viggle-Animate/raw/main/assets/fixed_prompt.txt);+shot descriptions, look, sound and music prompts are not used. The prompt is+embedded in the app, so generation does not need to fetch it. Video trim and+soundtrack settings still come from References.The template uses `Viggle-Animate-pruned_rank8_int8_convrot.safetensors` and`viggle_animate_distillation_bf16.safetensors` from DeepBeepMeep/MiniMax-H3.diff --git a/src-tauri/assets/viggle-animate-fixed-prompt.txt b/src-tauri/assets/viggle-animate-fixed-prompt.txtnew file mode 100644index 0000000..69e25d5--- /dev/null+++ b/src-tauri/assets/viggle-animate-fixed-prompt.txt@@ -0,0 +1,16 @@+<Video 1>: <0.2 seconds><1.2 seconds><2.2 seconds><3.2 seconds><4.2 seconds><5.0 seconds><Picture 1>: subject_definitions:+<Video 1> is the source video for the editing task.+<Picture 1> is one frame of the target video.++summary:+[video editing + character replacement] The target video is an edited version of <Video 1> in which every performer is replaced by a different person. <Picture 1> is one frame of the target video: it already shows the replacement, together with the background, camera framing and lighting it happens in. Every other frame of the target video shows those same people in that same place, following the motion, timing and camera of <Video 1>.++retention_analysis:+<Video 1> (source video editing): fully_preserved - the camera framing, the background, the lighting, and the motion and timing of every performance are copied frame for frame.+<Picture 1> (appears in [Shot 1]): reference - one frame of the target video, pixel for pixel. The people in it, their faces, hair, skin tone, build and clothing, and the background, the framing and the lighting are all taken from <Picture 1> and held unchanged from the first frame to the last.++detailed_description:+[Shot 1] The people of <Picture 1> perform exactly the motion of the corresponding performers in <Video 1>, in the same framing, on the same background, under the same lighting. Nothing outside the people changes. The camera framing never changes through the end of the video.++overall_soundscape:+No music and no speech.\ No newline at end of filediff --git a/src-tauri/src/slopfab.rs b/src-tauri/src/slopfab.rsindex 06b9c57..33e94ae 100644--- a/src-tauri/src/slopfab.rs+++ b/src-tauri/src/slopfab.rs@@ -17,6 +17,8 @@ use std::{use tauri::{AppHandle, Emitter};const DLL_FILE_NAME: &str = "slopfab.dll";+// https://huggingface.co/Viggle/Viggle-Animate/raw/main/assets/fixed_prompt.txt+const ANIMATE_PROMPT: &str = include_str!("../assets/viggle-animate-fixed-prompt.txt");/// Tauri stages the repository's runtime resources in development and release/// builds. Installers and portable folders use the same relative layout.pub fn default_dll_path() -> PathBuf {@@ -711,7 +713,7 @@ fn configure_request(include_models: bool,) -> Result<(), String> {configuration.validate_inputs(request)?;- api.set_prompt(handle, if configuration.animate { "" } else { &request.prompt })?;+ api.set_prompt(handle, if configuration.animate { ANIMATE_PROMPT } else { &request.prompt })?;api.set_frames(handle, request.frames)?;if request.still_image {api.set_still_image(handle)?;@@ -1795,7 +1797,7 @@ mod tests {}#[test]- fn animate_empty_prompt_and_four_steps_reach_bundled_dll() {+ fn animate_fixed_prompt_and_four_steps_reach_bundled_dll() {let settings = BTreeMap::from([("slopfab".into(), ProviderSetting {enabled: true, model: None,options: BTreeMap::from([@@ -1808,7 +1810,7 @@ mod tests {let id = create_reference_video(2.0, &settings).unwrap();let result = (|| -> Result<(), String> {append_reference_video(&id, &vec![127; 64 * 64 * 4], 64, 64, 0.0)?;- let request = GenerationRequest {+ let mut request = GenerationRequest {job_id: "animate-test".into(), frames: 48, steps: 20, seed: 1,canvas_width: 736, canvas_height: 416, reference_video_ids: vec![id.clone()],..Default::default()@@ -1818,6 +1820,12 @@ mod tests {let handle = RequestHandle::new(&api)?;configure_request(&api, handle.0, &request, &configuration, platform, include_models)?;assert_eq!(api.resolve(handle.0)?.num_model_evaluations, 3);+ assert!(api.describe(handle.0)?.contains(&format!("prompt {} characters", ANIMATE_PROMPT.len())));+ request.prompt = "This scene prompt must be ignored by Animate.".into();+ let handle = RequestHandle::new(&api)?;+ configure_request(&api, handle.0, &request, &configuration, platform, include_models)?;+ assert!(api.describe(handle.0)?.contains(&format!("prompt {} characters", ANIMATE_PROMPT.len())));+ request.prompt.clear();}}Ok(())