remote-gpu-render
Skill0 starsChanged 28 days agoMITView on GitHub
Use when a GPU job (FaceFusion face swap/face editor/face enhancer, Real-ESRGAN upscale to 4K, Seed-VC voice conversion, any CUDA onnxruntime/torch job) is too slow on a CPU server and a Windows PC with an NVIDIA card is available over SSH, or when that PC's tunnel drops, CUDA libraries fail to load, or its output doesn't match what was requested.
- Reads credentials
- Installs packages
In this repository26 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- ai-video-logo-replaceSkill
- beat-synced-overlaysSkill
- blender-set-from-storyboardSkill
- claude-accountsSkill
- codexSkill
- collab-sandboxSkill
- commercial-production-pipelineSkill
- credit-discipline-for-generationSkill
- deckSkill
- edit-rebuild-from-clean-sourcesSkill
- find-componentSkill
- greenscreen-to-ai-plate-compSkill
- higgsfield-production-routingSkill
- kinetic-type-physicsSkill
- lip-sync-and-gaze-qcSkill
- performance-voice-conversionSkill
- person-into-existing-sceneSkill
- phone-qaSkill
- project-tabSkill
- sales-appointment-prepSkill
- studio-vfxSkill
- tab-planSkill
- terminal-leadSkill
- video-qc-reviewerSkill
- website-buildSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Consent: only swap, edit or convert the faces and voices of people who agreed to it in writing, never to impersonate anyone or to make …
- Very specific: line 76
Real-ESRGAN ncnn: never run realesrgan-x4plus with -s 2 — the output comes back scrambled into mismatched tiles with seams.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Remote GPU render (a Windows NVIDIA PC you own, over SSH)
Overview
The CPU server orchestrates; the Windows PC does the CUDA work. The PC dials OUT to the server with a reverse SSH tunnel (no port-forwarding on the home router), a keep-awake supervisor keeps it up, and the PC's own Claude session watches the PC side. Nothing the PC reports counts until the server has ffprobed the output file itself.
Consent: only swap, edit or convert the faces and voices of people who agreed to it in writing, never to impersonate anyone or to make content that could pass as real footage of them.
Routing rule: FaceFusion swap/gaze/restore, ESRGAN 4K, Seed-VC → GPU. Light assembly, mixing, captions → the server. On CPU the same FaceFusion face_editor pass ran ~11 s/frame (30 min / 169 frames).
Link setup
- PC: enable OpenSSH Server; admin users' keys go in
C:\ProgramData\ssh\administrators_authorized_keys(not~\.ssh\authorized_keys), ACL admin+SYSTEM only. - Server: the PC's tunnel key in
authorized_keysrestricted withpermitlisten="localhost:<port>"— the port must match what the PC requests, or the forward silently fails. - PC:
scripts/tunnel_keepawake.ps1 -Server user@server -Port <port> -Key ...(SetThreadExecutionState- restart loop with
ExitOnForwardFailure,ServerAliveInterval 30). Run as a logon task.
- restart loop with
- Server: reach the PC with
ssh -p <port> -i ~/.ssh/<key> <pcuser>@localhost; watchdogscripts/link_watch.sh <port> <pcuser> <key> <log>undersetsid nohup … < /dev/null &(logs changes only). - A tunnel that "just died" after weeks: check whether something else on the server took the port (an sshd port change killed ours once) before debugging the PC.
FaceFusion on CUDA — gotchas we hit
| Symptom | Fix |
onnxruntime_providers_cuda.dll … depends on cublasLt64_12.dll which is missing (falls back to CPU silently) | pip install nvidia-cublas-cu12 nvidia-cudnn-cu12 nvidia-cuda-runtime-cu12 and prepend each package's bin dir to PATH in the launcher .bat (site-packages\nvidia\*\bin) |
ModuleNotFoundError: onnxruntime after installing | install onnxruntime-gpu into the SAME venv FaceFusion runs from (install.py --onnxruntime cuda), not the user site |
| protobuf version clash on import (another package upgraded it) | reinstall the protobuf version FaceFusion's requirements pin |
torchvision … requires torch==2.5.1+cu121 after upgrading torch | install the matching torchvision from the same CUDA index (--index-url …/cu124) |
| 4K upscale | use --output-video-scale 2.0, not a resolution flag. ALWAYS ffprobe width/height/frames of the output |
| Card is power-capped (≈370 W) | keep --execution-thread-count 2 |
Proof that CUDA is live: log line execution_providers=['cuda'] AND an onnxruntime session listing | |
CUDAExecutionProvider first; GPU utilisation in nvidia-smi during the run. |
Job pattern
scp -P <port> in.mp4 user@localhost:C:/jobs/in.mp4
ssh -p <port> user@localhost "C:\\jobs\\ffgpu.bat headless-run -t C:\\jobs\\in.mp4 -o C:\\jobs\\out.mp4 \
--processors frame_enhancer --frame-enhancer-model real_esrgan_x2 --output-video-scale 2.0 \
--execution-providers cuda --execution-thread-count 2"
scp -P <port> user@localhost:C:/jobs/out.mp4 .
ffprobe -v error -select_streams v:0 -count_frames \
-show_entries stream=width,height,nb_read_frames,r_frame_rate -of csv=p=0 out.mp4 # verify, then useffgpu.bat = activate the venv, set the CUDA DLL PATH, python facefusion.py %*.
Pairing with the PC's own Claude session
- The PC session owns PC-side setup (installs, drivers, keep-awake, tunnel) and guards the machine; the server session owns jobs and verification. Message it concrete asks; never ask it to change its own permissions.
- Its "done" is a claim. Verify from output only: file exists, ffprobe dims/frames/fps match the ask, a frame grab looks right at client zoom.
What FAILED
- Assuming FaceFusion used the GPU because
--execution-providers cudawas passed: it fell back to CPU on the missing cuBLAS DLL. Check the providers line. - An output-resolution flag instead of
--output-video-scale 2.0for the 4K upscale: don't; and never report "4K done" without ffprobe numbers. - A sleeping PC drops the tunnel (and any job with it) — the keep-awake supervisor is not optional.
pgrep -f/pkill -fpatterns that also match your own shell: kill by PID found from the port/log.
Status
link_watch.sh is the job's watchdog, generalized. tunnel_keepawake.ps1 is an untested template
written from the setup used on the job.
More lessons from real jobs
- Real-ESRGAN ncnn: never run
realesrgan-x4pluswith-s 2— the output comes back scrambled into mismatched tiles with seams. Run-s 4 -t 200, then downscale with ffmpeg lanczos on the PC. Rough speed on an RTX 3080: 32 stills x4 in ~72 s; a 5 s / 24 fps clip (121 frames) x4 →h264_nvenc~4 min. Run long jobs detached (keep any single ssh session short), spot-check crops for seams before use. - The PC can power-trip under full GPU load. Voice-model training at the card's stock power limit
hard-powered-off a PC twice (looks exactly like "the tunnel crashed"; a blinking GPU LED = PSU transient
trip). Fix: cap power before any long job (
nvidia-smi -pl 200, re-applied at boot by a scheduled task), one GPU process at a time, checkpoint often, one SSH/scp connection at a time. - Server-side watchdog: if the probe fails twice, check for a stale sshd still holding the forwarded port and clear it, so the PC's reconnect loop can bind again.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

