Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Package the worker separately

Bitti2018520fed84
diff --git a/README.md b/README.md
index 6275e72..71e65af 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ Local video generation requires separately installed model weights and GPU suppo
### Generating on another computer
-Copy the portable Slopus folder (it contains `slopus-worker.exe` and `slopfab.dll`) to a computer with a capable GPU on the same network and run:
+Unpack the Slopus worker package (`Slopus-<version>-windows-x64-worker.zip`, containing `slopus-worker.exe` and `slopfab.dll`) on a computer with a capable GPU on the same network and run:
```
slopus-worker.exe --weights D:\Models
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index cdf59bf..ecb9945 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -11,7 +11,7 @@ This alpha update adds still image projects, new scene types, and a rebuilt Wind
- Project-wide Undo and Redo (Ctrl+Z, Ctrl+Y) for edits made in any view, by the agent, or in project settings.
- Rebuilt Generator, References, Timeline, Export and Settings screens. The Generator is a board of scenes and shot tiles; References has Icons and Details views with multi-select; the Timeline gains zoom, keyboard shortcuts and context menus.
- The agent is a docked, resizable pane that keeps running while hidden.
-- LAN workers: run `slopus-worker` on another computer and pick it in the new **Settings → Workers** tab to generate there. Slopus finds workers on the local network automatically, or by address. Workers download generator weights from their download links themselves, local-only files are sent from this computer, and finished videos, images and latents are saved in your project as usual.
+- LAN workers: unpack the new Slopus worker package on another computer, run `slopus-worker`, and pick it in the new **Settings → Workers** tab to generate there. Slopus finds workers on the local network automatically, or by address. Workers download generator weights from their download links themselves, local-only files are sent from this computer, and finished videos, images and latents are saved in your project as usual.
- The Work queue and Agent buttons show when work is under way, and exports keep running in the background.
- Reference images can be paged through and removed, and effects can be bypassed without removing them.
diff --git a/package.cmd b/package.cmd
index 006a4d4..0eb6a22 100644
--- a/package.cmd
+++ b/package.cmd
@@ -55,6 +55,8 @@ set "OUTPUT_ZIP=%ARTIFACTS_DIR%\%OUTPUT_STEM%-portable.zip"
rem The portable layout is staged straight into the folder the zip is named
rem after, and kept there afterwards so the build is runnable without unpacking.
set "OUTPUT_DIR=%ARTIFACTS_DIR%\%OUTPUT_STEM%-portable"
+set "WORKER_ZIP=%ARTIFACTS_DIR%\%OUTPUT_STEM%-worker.zip"
+set "WORKER_DIR=%ARTIFACTS_DIR%\%OUTPUT_STEM%-worker"
echo.
echo [1/5] Installing locked frontend dependencies...
@@ -104,8 +106,6 @@ copy /Y "%RELEASE_EXE%" "%OUTPUT_DIR%\Slopus.exe" >nul || goto :fail
rem Match the installer's resource layout: one DLL beside Slopus.exe.
copy /Y "%SLOPFAB_DIR%\slopfab.dll" "%OUTPUT_DIR%\slopfab.dll" >nul || goto :fail
echo Runtime: slopfab.dll included.
-copy /Y "%WORKER_EXE%" "%OUTPUT_DIR%\slopus-worker.exe" >nul || goto :fail
-echo Worker: slopus-worker.exe included.
call :write_readme "%OUTPUT_DIR%\README.txt"
echo Folder: %OUTPUT_STEM%-portable\
@@ -117,11 +117,14 @@ powershell.exe -NoProfile -NonInteractive -Command "$ErrorActionPreference='Stop
rem Disable updates only in the unpacked folder used for local testing.
> "%OUTPUT_DIR%\slopus-portable" echo Local test build - automatic updates disabled.
if errorlevel 1 goto :fail
+call :package_worker || goto :fail
echo.
echo Package complete.
echo %OUTPUT_ZIP%
echo %OUTPUT_DIR%\
+echo %WORKER_ZIP%
+echo %WORKER_DIR%\
echo.
echo The unpacked folder beside the zip is this build - run it straight from
echo there. It is rebuilt from scratch on every package run.
@@ -132,6 +135,33 @@ echo.
popd
exit /b 0
+:package_worker
+rem The LAN worker ships as its own package: the headless worker and the
+rem runtime it loads, nothing else. Copy it to the computer that generates.
+if exist "%WORKER_DIR%" rd /s /q "%WORKER_DIR%"
+if exist "%WORKER_DIR%" (
+ echo ERROR: could not clear %WORKER_DIR%.
+ echo Close anything running out of that folder and retry.
+ exit /b 1
+)
+mkdir "%WORKER_DIR%" || exit /b 1
+copy /Y "%WORKER_EXE%" "%WORKER_DIR%\slopus-worker.exe" >nul || exit /b 1
+copy /Y "%SLOPFAB_DIR%\slopfab.dll" "%WORKER_DIR%\slopfab.dll" >nul || exit /b 1
+> "%WORKER_DIR%\README.txt" echo Slopus worker %APP_VERSION% ^(windows-%PACKAGE_ARCH%^)
+>>"%WORKER_DIR%\README.txt" echo.
+>>"%WORKER_DIR%\README.txt" echo Run "slopus-worker.exe" to let Slopus generate on this computer over the local network.
+>>"%WORKER_DIR%\README.txt" echo Slopus finds it automatically; choose it in Settings, Workers. Allow it through Windows Firewall when asked.
+>>"%WORKER_DIR%\README.txt" echo Keep slopfab.dll beside slopus-worker.exe.
+>>"%WORKER_DIR%\README.txt" echo.
+>>"%WORKER_DIR%\README.txt" echo WEIGHTS
+>>"%WORKER_DIR%\README.txt" echo Weights with download links are downloaded here on first use. Add folders that already
+>>"%WORKER_DIR%\README.txt" echo hold Slopus downloads with --weights. Other model files are sent from Slopus.
+>>"%WORKER_DIR%\README.txt" echo.
+>>"%WORKER_DIR%\README.txt" echo Run "slopus-worker.exe --help" for options such as --port, --token and --weights.
+powershell.exe -NoProfile -NonInteractive -Command "$ErrorActionPreference='Stop'; Compress-Archive -Path (Join-Path $env:WORKER_DIR '*') -DestinationPath $env:WORKER_ZIP -CompressionLevel Optimal -Force" || exit /b 1
+echo Worker: %OUTPUT_STEM%-worker\
+exit /b 0
+
:write_readme
> "%~1" echo Slopus %APP_VERSION% ^(windows-%PACKAGE_ARCH%, portable^)
>>"%~1" echo.
@@ -145,9 +175,7 @@ exit /b 0
>>"%~1" echo Model weights are not included. Set their paths in Settings.
>>"%~1" echo.
>>"%~1" echo LAN WORKER
->>"%~1" echo Run "slopus-worker.exe" from this folder on another computer to generate there.
->>"%~1" echo Slopus finds it on the local network; choose it in Settings, Workers.
->>"%~1" echo Run "slopus-worker.exe --help" for options such as --weights and --token.
+>>"%~1" echo To generate on another computer, run the separate Slopus worker package there.
exit /b 0
:fail
diff --git a/release.cmd b/release.cmd
index ed41481..206be97 100644
--- a/release.cmd
+++ b/release.cmd
@@ -78,6 +78,8 @@ set "OUTPUT_ZIP=%ARTIFACTS_DIR%\%OUTPUT_STEM%-portable.zip"
rem The portable layout is staged straight into the folder the zip is named
rem after, and kept there afterwards so the build is runnable without unpacking.
set "OUTPUT_DIR=%ARTIFACTS_DIR%\%OUTPUT_STEM%-portable"
+set "WORKER_ZIP=%ARTIFACTS_DIR%\%OUTPUT_STEM%-worker.zip"
+set "WORKER_DIR=%ARTIFACTS_DIR%\%OUTPUT_STEM%-worker"
echo.
echo [1/5] Installing locked frontend dependencies...
@@ -153,8 +155,6 @@ copy /Y "%RELEASE_EXE%" "%OUTPUT_DIR%\Slopus.exe" >nul || goto :fail
rem Match the installer's resource layout: one DLL beside Slopus.exe.
copy /Y "%SLOPFAB_DIR%\slopfab.dll" "%OUTPUT_DIR%\slopfab.dll" >nul || goto :fail
echo Runtime: slopfab.dll included.
-copy /Y "%WORKER_EXE%" "%OUTPUT_DIR%\slopus-worker.exe" >nul || goto :fail
-echo Worker: slopus-worker.exe included.
call :write_readme "%OUTPUT_DIR%\README.txt"
echo Folder: %OUTPUT_STEM%-portable\
@@ -166,6 +166,7 @@ powershell.exe -NoProfile -NonInteractive -Command "$ErrorActionPreference='Stop
rem Disable updates only in the unpacked folder used for local testing.
> "%OUTPUT_DIR%\slopus-portable" echo Local test build - automatic updates disabled.
if errorlevel 1 goto :fail
+call :package_worker || goto :fail
echo.
echo Package complete.
@@ -175,6 +176,8 @@ echo %ARTIFACTS_DIR%\latest.json
if defined MSI_SRC echo %OUTPUT_MSI%
echo %OUTPUT_ZIP%
echo %OUTPUT_DIR%\
+echo %WORKER_ZIP%
+echo %WORKER_DIR%\
echo.
echo The unpacked folder beside the zip is this build - run it straight from
echo there. It is rebuilt from scratch on every package run.
@@ -202,6 +205,33 @@ echo Usage: release.cmd [--publish]
popd
exit /b 1
+:package_worker
+rem The LAN worker ships as its own package: the headless worker and the
+rem runtime it loads, nothing else. Copy it to the computer that generates.
+if exist "%WORKER_DIR%" rd /s /q "%WORKER_DIR%"
+if exist "%WORKER_DIR%" (
+ echo ERROR: could not clear %WORKER_DIR%.
+ echo Close anything running out of that folder and retry.
+ exit /b 1
+)
+mkdir "%WORKER_DIR%" || exit /b 1
+copy /Y "%WORKER_EXE%" "%WORKER_DIR%\slopus-worker.exe" >nul || exit /b 1
+copy /Y "%SLOPFAB_DIR%\slopfab.dll" "%WORKER_DIR%\slopfab.dll" >nul || exit /b 1
+> "%WORKER_DIR%\README.txt" echo Slopus worker %APP_VERSION% ^(windows-%PACKAGE_ARCH%^)
+>>"%WORKER_DIR%\README.txt" echo.
+>>"%WORKER_DIR%\README.txt" echo Run "slopus-worker.exe" to let Slopus generate on this computer over the local network.
+>>"%WORKER_DIR%\README.txt" echo Slopus finds it automatically; choose it in Settings, Workers. Allow it through Windows Firewall when asked.
+>>"%WORKER_DIR%\README.txt" echo Keep slopfab.dll beside slopus-worker.exe.
+>>"%WORKER_DIR%\README.txt" echo.
+>>"%WORKER_DIR%\README.txt" echo WEIGHTS
+>>"%WORKER_DIR%\README.txt" echo Weights with download links are downloaded here on first use. Add folders that already
+>>"%WORKER_DIR%\README.txt" echo hold Slopus downloads with --weights. Other model files are sent from Slopus.
+>>"%WORKER_DIR%\README.txt" echo.
+>>"%WORKER_DIR%\README.txt" echo Run "slopus-worker.exe --help" for options such as --port, --token and --weights.
+powershell.exe -NoProfile -NonInteractive -Command "$ErrorActionPreference='Stop'; Compress-Archive -Path (Join-Path $env:WORKER_DIR '*') -DestinationPath $env:WORKER_ZIP -CompressionLevel Optimal -Force" || exit /b 1
+echo Worker: %OUTPUT_STEM%-worker\
+exit /b 0
+
:write_readme
> "%~1" echo Slopus %APP_VERSION% ^(windows-%PACKAGE_ARCH%, portable^)
>>"%~1" echo.
@@ -215,9 +245,7 @@ exit /b 1
>>"%~1" echo Model weights are not included. Set their paths in Settings.
>>"%~1" echo.
>>"%~1" echo LAN WORKER
->>"%~1" echo Run "slopus-worker.exe" from this folder on another computer to generate there.
->>"%~1" echo Slopus finds it on the local network; choose it in Settings, Workers.
->>"%~1" echo Run "slopus-worker.exe --help" for options such as --weights and --token.
+>>"%~1" echo To generate on another computer, run the separate Slopus worker package there.
exit /b 0
:fail
diff --git a/scripts/publish-release.mjs b/scripts/publish-release.mjs
index a3ad90c..c7591d4 100644
--- a/scripts/publish-release.mjs
+++ b/scripts/publish-release.mjs
@@ -57,6 +57,7 @@ export function releaseFiles(root, version) {
}
if (!manifest.platforms[`${target}-nsis`]) throw new Error('Missing NSIS updater target.');
names.add(`${stem}-portable.zip`);
+ names.add(`${stem}-worker.zip`);
// Upload the manifest last. Only this explicit list can become release assets.
names.add('latest.json');
const files = [...names].map((name) => {
diff --git a/scripts/publish-release.test.mjs b/scripts/publish-release.test.mjs
index ac52b60..0d3e02b 100644
--- a/scripts/publish-release.test.mjs
+++ b/scripts/publish-release.test.mjs
@@ -31,6 +31,7 @@ function fixture() {
writeFileSync(`${path}.sig`, 'signature\n');
}
writeFileSync(join(root, 'artifacts/Slopus-0.2.0-windows-x64-portable.zip'), 'zip');
+ writeFileSync(join(root, 'artifacts/Slopus-0.2.0-windows-x64-worker.zip'), 'zip');
// Unrelated artifacts and secrets must never be included by a wildcard upload.
writeFileSync(join(root, 'artifacts/private.key'), 'secret');
writeFileSync(join(root, 'artifacts/Slopus-0.1.0-windows-x64-setup.exe'), 'old');