Commit Graph

416 Commits

Author SHA1 Message Date
giles
81dc40534c Add progress metadata to ipfs-stream endpoint
Returns progress, frame, total_frames from Celery task state
so clients can display rendering progress.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:16:17 +00:00
giles
43d73c7bf7 Fix segment deletion and add progress callback
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
- Remove stream_dir deletion in finally block to prevent IPFS upload failures
- Add on_progress callback to StreamInterpreter for real-time progress updates
- Task now sends progress updates to Celery state during rendering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 20:13:27 +00:00
giles
d900df5aa0 Add View on IPFS button to effect and recipe detail pages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:56:12 +00:00
giles
13415fb420 Add Run Recipe and Delete buttons to recipe detail page
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:43:32 +00:00
giles
d6c575760b Add Delete and Run Again buttons to run detail page
- Add "Run Again" button that reruns the recipe with same parameters
- Add "Delete" button with confirmation to delete run and artifacts
- Consolidate result display into single #action-result span
- Implement POST /runs/rerun/{recipe_id} endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:18:16 +00:00
giles
9a8a701492 Fix GPU encoding black frames and improve debug logging
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
- Add CUDA sync before encoding to ensure RGB->NV12 kernel completes
- Add debug logging for frame data validation (sum check)
- Handle GPUFrame objects in GPUHLSOutput.write()
- Fix cv2.resize for CuPy arrays (use cupyx.scipy.ndimage.zoom)
- Fix fused pipeline parameter ordering (geometric first, color second)
- Add raindrop-style ripple with random position/freq/decay/amp
- Generate final VOD playlist with #EXT-X-ENDLIST

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:33:12 +00:00
giles
b15e381f81 Use /ipfs-ts/ path for HLS segments to get correct MIME type
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 12:46:54 +00:00
giles
baf79f453f Fix IPFS stream caching - return live playlist CID from database
- Return ipfs_playlist_cid from pending_runs while task is running
- Add Cache-Control: no-cache headers to prevent browser/CDN caching
- Fix streaming clients getting stale playlist CIDs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:32:56 +00:00
giles
cd95e62899 Use base primitive names, let interpreter auto-select GPU
Recipe should work on both CPU and GPU. The interpreter
auto-selects *_gpu versions when available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:21:32 +00:00
giles
514ee89cca Add deterministic debug logging to fused pipeline
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 12:17:17 +00:00
giles
0a6dc0099b Add debug logging to fused pipeline
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 12:13:39 +00:00
giles
180d6a874e Fix fallback path to read ripple_amplitude from dynamic_params
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
The Python fallback path was reading amplitude directly from effect dict
instead of checking dynamic_params first like the CUDA kernel path does.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:11:27 +00:00
giles
949d716d9a Add dynamic zoom and ripple amplitude to woods recipe
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
- Zoom now driven by audio energy via core:map-range
- Ripple amplitude reads from dynamic_params in sexp_to_cuda
- Crossfade transition with zoom in/out effect
- Move git clone before COPY in Dockerfile for better caching

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:04:00 +00:00
giles
d5f30035da Fix async event loop conflict in resolve_asset
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
When running with --pool=solo, there may already be a running event loop.
Use thread pool to run async coroutines when a loop is already running.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:52:50 +00:00
giles
4b0f1b0bcd Return raw array from fused-pipeline fallback
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Downstream code expects arrays with .flags attribute, not GPUFrame.
Extract the underlying gpu/cpu array before returning.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:42:20 +00:00
giles
9583ecb81a Fix ripple parameter names in fused-pipeline fallback
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Use cx/cy instead of center_x/center_y to match gpu_ripple signature.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:40:57 +00:00
giles
6ee8d72d24 Fix GPUFrame wrapping in fused-pipeline fallback
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
The fallback path was passing raw numpy/cupy arrays to GPU functions
that expect GPUFrame objects with .cpu property.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:39:34 +00:00
giles
ed617fcdd6 Fix lazy audio path resolution for GPU streaming
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Audio playback path was being resolved during parsing when database
may not be ready, causing fallback to non-existent path. Now resolves
lazily when stream starts, matching how audio analyzer works.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:32:04 +00:00
giles
ef3638d3cf Make HLS segment uploads async to prevent stuttering
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 10:25:56 +00:00
giles
dd169635ca Fix source indexing with modulo 2026-02-04 10:22:23 +00:00
giles
92f8e8a98c Fix blending primitive name 2026-02-04 10:19:09 +00:00
giles
48eed99a28 Fix streaming primitives namespace in optimized recipe 2026-02-04 10:17:28 +00:00
giles
9ce64ea797 Add optimized woods-recipe using fused-pipeline 2026-02-04 10:15:46 +00:00
giles
70530e5c92 Add GPU image primitives (gpu-make-image, gpu-gradient)
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 10:05:09 +00:00
giles
76bf19b8ab Add full optimized pipeline test 2026-02-04 10:04:09 +00:00
giles
1bd171b892 Add autonomous prealloc benchmark 2026-02-04 10:03:24 +00:00
giles
e4349ba501 Add autonomous-pipeline primitive for zero-Python hot path
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 10:02:40 +00:00
giles
6e20d19a23 Fix float literal syntax in autonomous kernel
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 10:01:43 +00:00
giles
e64ca9fe3a Add autonomous CUDA kernel that computes all params on GPU
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 10:01:08 +00:00
giles
def62de578 Fix heavy tests to use available primitives 2026-02-04 09:57:29 +00:00
giles
f858e25246 Add heavy pipeline comparison tests 2026-02-04 09:56:29 +00:00
giles
a162171025 Add interpreted vs fused comparison test 2026-02-04 09:55:22 +00:00
giles
234fbdbee2 Fix primitive_lib_dir path resolution for sexp files in app root
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 09:54:07 +00:00
giles
1442216a15 Handle Keyword dict keys in fused-pipeline primitive
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 09:53:28 +00:00
giles
b773689814 Fix fast_ripple signature in test 2026-02-04 09:52:30 +00:00
giles
2d20a6f452 Add fused-pipeline primitive and test for compiled CUDA kernels
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 09:51:56 +00:00
giles
8b9309a90b Fix f-string brace escaping in ripple effect CUDA code
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 09:49:52 +00:00
giles
3b964ba18d Add sexp to CUDA kernel compiler for fused pipeline
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:46:40 +00:00
giles
4d95ec5a32 Add profiling to stream interpreter to find bottleneck
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:32:53 +00:00
giles
ad1d7893f8 Integrate fast CUDA kernels for GPU effects pipeline
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Replace slow scipy.ndimage operations with custom CUDA kernels:
- gpu_rotate: AFFINE_WARP_KERNEL (< 1ms vs 20ms for scipy)
- gpu_blend: BLEND_KERNEL for fast alpha blending
- gpu_brightness/contrast: BRIGHTNESS_CONTRAST_KERNEL
- Add gpu_zoom, gpu_hue_shift, gpu_invert, gpu_ripple

Preserve GPU arrays through pipeline:
- Updated _maybe_to_numpy() to keep CuPy arrays for GPU primitives
- Primitives detect CuPy arrays via __cuda_array_interface__
- No unnecessary CPU round-trips between operations

New jit_compiler.py contains all CUDA kernels with FastGPUOps
class using ping-pong buffer strategy for efficient in-place ops.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:53:46 +00:00
giles
75f9d8fb11 Configure GPU encoder for low-latency (no B-frames)
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:40:07 +00:00
giles
b96e8ca4d2 Add playlist_url property to GPUHLSOutput
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:37:21 +00:00
giles
8051ef9ba9 Fix GPUHLSOutput method name (write not write_frame)
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:34:51 +00:00
giles
3adf927ca1 Add zero-copy GPU encoding pipeline
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
- New GPUHLSOutput class for direct GPU-to-NVENC encoding
- RGB→NV12 conversion via CUDA kernel (no CPU transfer)
- Uses PyNvVideoCodec for zero-copy GPU encoding
- ~220fps vs ~4fps with CPU pipe approach
- Automatically used when PyNvVideoCodec is available

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:32:43 +00:00
giles
9bdad268a5 Fix DLPack: use frame.to_dlpack() for decord→CuPy zero-copy
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:10:18 +00:00
giles
1cb9c3ac8a Add DLPack debug logging to diagnose zero-copy
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:06:19 +00:00
giles
36c4afeb84 Add LD_PRELOAD for libnvcuvid in Dockerfile
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 01:56:40 +00:00
giles
b6292268fa Add NVDEC headers and libnvcuvid stub for decord build
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 01:53:37 +00:00
giles
3a02fca7fd Add FFmpeg dev headers for decord build
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
2026-02-04 01:52:21 +00:00
giles
c4004b3f5d Multi-stage Dockerfile for decord CUDA build
Some checks are pending
GPU Worker CI/CD / test (push) Waiting to run
GPU Worker CI/CD / deploy (push) Blocked by required conditions
Use devel image for compilation, runtime for final image.
Keeps image smaller while enabling NVDEC decode.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:51:00 +00:00