AI media harness for planning, generating, and editing locally
TypeScript
Update SlopFab tooling
Bittic52ae21b8711
diff --git a/README.md b/README.mdindex 3a55c15..83c3188 100644--- a/README.md+++ b/README.md@@ -60,6 +60,6 @@ The web fallback seeds three deterministic showcase projects on first launch. Re`npm run reference-icons` renders every missing character, product, location, and style preset with MiniMax H3 at 30 steps. The generator reads the application catalogue directly, requests the model's minimum temporal span, and writes frame 0 directly as a high-quality 4:4:4 256×256 JPEG without creating an intermediate video or audio file. Character entries use controlled headshot lighting; product and location entries use a complete-subject view; style entries use a representative composition with lighting and rendering tailored to the named style.-VidFab, Cargo, and FFmpeg must be installed. The script uses the development paths under `D:\Projects\vidfab` by default; `VIDFAB_EXE`, `VIDFAB_TRANSFORMER`, `VIDFAB_TEXT_ENCODER`, `VIDFAB_VIDEO_VAE`, `VIDFAB_AUDIO_VAE`, `VIDFAB_BACKEND`, `CARGO_EXE`, and `FFMPEG_EXE` can override them. Use `node scripts/generate-reference-icons.mjs --id=<preset-id> --force` to regenerate one entry.+SlopFab, Cargo, and FFmpeg must be installed. The script uses the development paths under `D:\Projects\slopfab` by default; `SLOPFAB_EXE`, `SLOPFAB_TRANSFORMER`, `SLOPFAB_TEXT_ENCODER`, `SLOPFAB_VIDEO_VAE`, `SLOPFAB_AUDIO_VAE`, `SLOPFAB_BACKEND`, `CARGO_EXE`, and `FFMPEG_EXE` can override them. Use `node scripts/generate-reference-icons.mjs --id=<preset-id> --force` to regenerate one entry.The batch defaults to two GPU workers. Set `REFERENCE_ICON_WORKERS=1` or pass `--workers=1` on a lower-memory card. Use `--type=style` to generate or replace only style icons; `--shard=1/2` selects the first alternating half for a resumable recovery pass.diff --git a/docs/architecture.md b/docs/architecture.mdindex b4b69fa..f7cde3c 100644--- a/docs/architecture.md+++ b/docs/architecture.md@@ -43,7 +43,7 @@ Shots are sequential, later shots carry increasing cut timestamps, camera moves## Generation boundary-The vidfab C API is loaded dynamically by the Rust backend. It resolves requests immediately, runs asynchronously, permits only one active generation per process, reports progress from a worker thread, and returns raw planar RGB frames plus interleaved audio. PolStudio therefore owns:+The slopfab C API is loaded dynamically by the Rust backend. It resolves requests immediately, runs asynchronously, permits only one active generation per process, reports progress from a worker thread, and returns raw planar RGB frames plus interleaved audio. PolStudio therefore owns:- compute-platform selection: CUDA 13 when usable, then CUDA 12, then Vulkan with exact attention;- a serial generation queue and cancellation;@@ -59,5 +59,5 @@ The application must fail gracefully when the DLL, model files, WebCodecs, or We1. Foundation: desktop shell, library, portable project persistence, schema, and always-visible agent prompt.2. Timeline: preview, track controls, clips, playhead, selection, and credible editing interactions.-3. Agent and generation: provider adapters, validated command batches, H3 prompt compiler, vidfab queue, progress, and cancellation.+3. Agent and generation: provider adapters, validated command batches, H3 prompt compiler, slopfab queue, progress, and cancellation.4. References and polish: reusable text/image inputs, binding them to jobs, accessibility, responsive behavior, and end-to-end verification.diff --git a/package.cmd b/package.cmdindex b861259..72abcf8 100644--- a/package.cmd+++ b/package.cmd@@ -9,9 +9,9 @@ set "BUNDLE_DIR=%ROOT_DIR%\src-tauri\target\release\bundle"set "RELEASE_EXE=%ROOT_DIR%\src-tauri\target\release\pol-studio.exe"rem The generation runtime is built by a separate project. Override with-rem set VIDFAB_DIR=...\build\Release+rem set SLOPFAB_DIR=...\build\Releaserem before running if it lives somewhere else.-if not defined VIDFAB_DIR set "VIDFAB_DIR=D:\Projects\vidfab\build\Release"+if not defined SLOPFAB_DIR set "SLOPFAB_DIR=D:\Projects\slopfab\build\Release"where.exe npm.cmd >nul 2>nul || (echo ERROR: npm was not found on PATH.@@ -124,17 +124,17 @@ if exist "%OUTPUT_DIR%" (mkdir "%OUTPUT_DIR%" || goto :failcopy /Y "%RELEASE_EXE%" "%OUTPUT_DIR%\PolStudio.exe" >nul || goto :fail-set "VIDFAB_BUNDLED=no"-if exist "%VIDFAB_DIR%\vidfab.dll" (+set "SLOPFAB_BUNDLED=no"+if exist "%SLOPFAB_DIR%\slopfab.dll" (rem Beside PolStudio.exe, not in a subfolder. That is where the app looks,- rem so there is nothing left for anyone to configure - and vidfab.dll is+ rem so there is nothing left for anyone to configure - and slopfab.dll isrem loaded with LOAD_WITH_ALTERED_SEARCH_PATH, so its dependencies have torem sit in the same folder as it anyway.- copy /Y "%VIDFAB_DIR%\vidfab.dll" "%OUTPUT_DIR%\" >nul || goto :fail- set "VIDFAB_BUNDLED=yes"- echo Runtime: vidfab.dll included.+ copy /Y "%SLOPFAB_DIR%\slopfab.dll" "%OUTPUT_DIR%\" >nul || goto :fail+ set "SLOPFAB_BUNDLED=yes"+ echo Runtime: slopfab.dll included.) else (- echo Runtime: vidfab not found at %VIDFAB_DIR% - shipping without it.+ echo Runtime: slopfab not found at %SLOPFAB_DIR% - shipping without it.echo The app still runs; it reports the generator as unavailable.)@@ -172,8 +172,8 @@ exit /b 0>>"%~1" echo Microsoft Edge WebView2. Use the setup installer if it is missing.>>"%~1" echo.>>"%~1" echo VIDEO GENERATION-if /I "%VIDFAB_BUNDLED%"=="yes" (- >>"%~1" echo The runtime is included. Keep vidfab.dll beside PolStudio.exe.+if /I "%SLOPFAB_BUNDLED%"=="yes" (+ >>"%~1" echo The runtime is included. Keep slopfab.dll beside PolStudio.exe.) else (>>"%~1" echo The runtime is not included. Editing still works.)diff --git a/scripts/generate-reference-icons.mjs b/scripts/generate-reference-icons.mjsindex f849766..a2d41e2 100644--- a/scripts/generate-reference-icons.mjs+++ b/scripts/generate-reference-icons.mjs@@ -10,20 +10,20 @@ const repository = resolve(scriptDirectory, "..");const outputDirectory = join(repository, "src", "assets", "reference-icons");const defaults = {- executable: "D:\\Projects\\vidfab\\build\\Release\\vidfab.exe",- transformer: "D:\\Projects\\vidfab\\weights\\transformer\\MiniMax_H3_FL2VA_pruned_nvfp4.safetensors",- textEncoder: "D:\\Projects\\vidfab\\weights\\text_encoder\\qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",- videoVae: "D:\\Projects\\vidfab\\weights\\vae\\video_vae_nf4.safetensors",- audioVae: "D:\\Projects\\vidfab\\weights\\vae\\audio_vae_nf4.safetensors",+ executable: "D:\\Projects\\slopfab\\build\\Release\\slopfab.exe",+ transformer: "D:\\Projects\\slopfab\\weights\\transformer\\MiniMax_H3_FL2VA_pruned_nvfp4.safetensors",+ textEncoder: "D:\\Projects\\slopfab\\weights\\text_encoder\\qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",+ videoVae: "D:\\Projects\\slopfab\\weights\\vae\\video_vae_nf4.safetensors",+ audioVae: "D:\\Projects\\slopfab\\weights\\vae\\audio_vae_nf4.safetensors",cargo: "C:\\Users\\NN\\.cargo\\bin\\cargo.exe",};const settings = {- executable: process.env.VIDFAB_EXE || defaults.executable,- transformer: process.env.VIDFAB_TRANSFORMER || defaults.transformer,- textEncoder: process.env.VIDFAB_TEXT_ENCODER || defaults.textEncoder,- videoVae: process.env.VIDFAB_VIDEO_VAE || defaults.videoVae,- audioVae: process.env.VIDFAB_AUDIO_VAE || defaults.audioVae,+ executable: process.env.SLOPFAB_EXE || defaults.executable,+ transformer: process.env.SLOPFAB_TRANSFORMER || defaults.transformer,+ textEncoder: process.env.SLOPFAB_TEXT_ENCODER || defaults.textEncoder,+ videoVae: process.env.SLOPFAB_VIDEO_VAE || defaults.videoVae,+ audioVae: process.env.SLOPFAB_AUDIO_VAE || defaults.audioVae,cargo: process.env.CARGO_EXE || defaults.cargo,ffmpeg: process.env.FFMPEG_EXE || "ffmpeg",};@@ -75,8 +75,8 @@ function loadCatalog() {}function backend() {- if (process.env.VIDFAB_BACKEND === "cuda" || process.env.VIDFAB_BACKEND === "vulkan") {- return process.env.VIDFAB_BACKEND;+ if (process.env.SLOPFAB_BACKEND === "cuda" || process.env.SLOPFAB_BACKEND === "vulkan") {+ return process.env.SLOPFAB_BACKEND;}const devices = spawnSync(settings.executable, ["devices"], { encoding: "utf8", windowsHide: true });return devices.status === 0 && /^device\s+\d+/m.test(devices.stdout || "") ? "cuda" : "vulkan";@@ -267,11 +267,11 @@ try {const executable = join(repository, "src-tauri", "target", "debug", "reference_icons.exe");const environment = {...process.env,- VIDFAB_EXE: settings.executable,- VIDFAB_TRANSFORMER: settings.transformer,- VIDFAB_TEXT_ENCODER: settings.textEncoder,- VIDFAB_VIDEO_VAE: settings.videoVae,- VIDFAB_BACKEND: inferenceBackend,+ SLOPFAB_EXE: settings.executable,+ SLOPFAB_TRANSFORMER: settings.transformer,+ SLOPFAB_TEXT_ENCODER: settings.textEncoder,+ SLOPFAB_VIDEO_VAE: settings.videoVae,+ SLOPFAB_BACKEND: inferenceBackend,};const batchPaths = await Promise.all(batches.map(async (batch, index) => {const batchPath = join(temporaryDirectory, `batch-${index + 1}.json`);diff --git a/src-tauri/src/bin/reference_icons.rs b/src-tauri/src/bin/reference_icons.rsindex 0455323..153a19a 100644--- a/src-tauri/src/bin/reference_icons.rs+++ b/src-tauri/src/bin/reference_icons.rs@@ -16,11 +16,11 @@ fn run() -> Result<(), String> {generate_reference_icon_batch(&specs,&ReferenceIconBatchConfig {- dll_path: PathBuf::from(required("VIDFAB_EXE")?).with_file_name("vidfab.dll"),- transformer: required("VIDFAB_TRANSFORMER")?.into(),- text_encoder: required("VIDFAB_TEXT_ENCODER")?.into(),- video_vae: required("VIDFAB_VIDEO_VAE")?.into(),- backend: env::var("VIDFAB_BACKEND").unwrap_or_else(|_| "cuda".into()),+ dll_path: PathBuf::from(required("SLOPFAB_EXE")?).with_file_name("slopfab.dll"),+ transformer: required("SLOPFAB_TRANSFORMER")?.into(),+ text_encoder: required("SLOPFAB_TEXT_ENCODER")?.into(),+ video_vae: required("SLOPFAB_VIDEO_VAE")?.into(),+ backend: env::var("SLOPFAB_BACKEND").unwrap_or_else(|_| "cuda".into()),},)}