videodraft 0.37.0 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videodraft",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "Official VideoDraft CLI for AI videos, images, audio and 3D assets. Agent-friendly: --json everywhere, stable exit codes, async job polling.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/skills/index.json CHANGED
@@ -12,8 +12,13 @@
12
12
  },
13
13
  {
14
14
  "path": "references/cloud-render.md",
15
- "sha256": "d10389868d89b076b8ebd92afe41e6f3687eeb9839a724e961e95ba49aae784c",
16
- "bytes": 11832
15
+ "sha256": "7dd43f094c81f6853721f88eda9f7d0779dd8a9f36611c9019a5d3e24392ba01",
16
+ "bytes": 12267
17
+ },
18
+ {
19
+ "path": "references/cloud-sessions.md",
20
+ "sha256": "9aa2512ad6a7e90a7e2aae6919f3c897d224a85ac0a48848f1d37ac0cac9d0fd",
21
+ "bytes": 7514
17
22
  },
18
23
  {
19
24
  "path": "references/editor.md",
@@ -37,8 +42,8 @@
37
42
  },
38
43
  {
39
44
  "path": "SKILL.md",
40
- "sha256": "e4fb73ccccaaa982bd1b723f278575ffeb9798b119ee5491588e9ca4c5abf404",
41
- "bytes": 60378
45
+ "sha256": "07be274c5da53dbf5bc58a1012dc41e0ebdf8e96451cd68b39b3ef28cb51aa3f",
46
+ "bytes": 61370
42
47
  }
43
48
  ]
44
49
  }
@@ -11,6 +11,7 @@ VideoDraft is an AI video creation platform where asset generation is the priori
11
11
  - **Asset I/O**: upload local files, download outputs, auto-upload local references, and save generated media where the user can see it.
12
12
  - **3D assets**: standalone Meshy 7.1 and Tripo H3.1 meshes, multi-view generation, complete artifact downloads, and Meshy humanoid rigging through MCP/CLI. Read [references/3d.md](references/3d.md), or `videodraft skills show 3d`. These assets have their own saved library and do not require an AI Studio session or web viewer.
13
13
  - **Cloud render**: render the user's own Blender scenes on a cloud GPU with `videodraft render blender`. See [Cloud render](#cloud-render-blender-on-a-cloud-gpu) below and [references/cloud-render.md](references/cloud-render.md), or `videodraft skills show render`.
14
+ - **Cloud sessions**: a cloud GPU machine to build scenes and run Blender scripts on, one per project, with `videodraft render session`. Read [references/cloud-sessions.md](references/cloud-sessions.md), or `videodraft skills show sessions`.
14
15
  - **Native editing**: local `.vdproject` timelines, cuts, layouts, captions, effects, audio, and exports through the headless VideoDraft Editor. Inside VideoDraft ADE, this is the default production and export lane when `videodraft_editor` is available and no chosen app or existing external project takes precedence.
15
16
  - **Hosted project production**: idea → script → storyboard → hosted production timeline → exported MP4. Use the early stages for scripts, storyboards, and generated assets when useful. Treat hosted production and export as a fallback when the native editor is unavailable and no external app is selected, or as an explicit destination when the user asks for an editable web project or hosted workflow.
16
17
 
@@ -171,12 +172,12 @@ Use Cloud render when the user wants their own Blender scene, an animation or a
171
172
  ```bash
172
173
  videodraft render prices # live price per GPU-minute for each GPU size on offer
173
174
  videodraft render blender scene.blend --frames 1-240 # upload, render, wait, download media/renders/<job_id>.mp4
174
- videodraft render stop # switch every GPU off when your task is done
175
+ videodraft render stop # every machine on the account off (only when the user asks)
175
176
  ```
176
177
 
177
178
  - Pack the scene first (Blender: File > External Data > Pack Resources, then save). Files outside the `.blend` are missing on the GPU, and scripts inside it never run. The engine (Cycles or Eevee) is whatever the scene is set to.
178
179
  - `videodraft render prices` lists the GPU sizes on offer; `--gpu full` (96 GB) is the default and fastest. When smaller sizes (`half`, `quarter`) are offered they cost less per frame but take longer: use them when the user wants it cheaper and is not in a hurry, and run a render again on a bigger size if it fails for GPU memory.
179
- - Every job gets its own machine, so several renders run at the same time. A machine bills per second while it is on, at the rate `videodraft render prices` returns, and switches itself off 1 minute after its last job. State the rate and get a go-ahead before long renders; `render status` shows a job's cost so far and an estimate. When your task is done, run `videodraft render stop` so idle time is not billed.
180
+ - Every job gets its own machine, so several renders run at the same time. A machine bills per second while it is on, at the rate `videodraft render prices` returns, and switches itself off 1 minute after its last job. State the rate and get a go-ahead before long renders; `render status` shows a job's cost so far and an estimate. `videodraft render stop` switches off every machine on the account, other agents' included, so run it only when the user asks.
180
181
  - When Google has no regular GPU for a few minutes, a full-GPU job also asks for a Spot GPU at a higher rate (`render prices` shows it), and the first GPU found takes the job; a Spot machine that is already on can also take the next job at once. When you state the rate before a long render, give the Spot rate too. Google can reclaim a Spot machine; the job then continues from its finished segments. Tell the user when a job runs on Spot, and use `--no-spot` when they want the regular rate only or the render must not be interrupted.
181
182
  - Waiting for a GPU is never billed. A job waits for Google to hand over a machine (usually 1 to 10 minutes, longer at busy times), then pays for about 15 seconds of start-up, the rendering, and about a minute of idle time before its machine switches off (none when another job takes the machine over). Test renders cost a few credits, so run tests and proofs in the cloud too, and submit jobs together. A queued job may have a machine starting or charges from an earlier attempt; check its phase and cost. Its displayed machine is only a candidate until the job is claimed.
182
183
  - Name jobs with `--name "S4 final"` (default: the scene's file name and frames); `render status`, `wait`, `cancel` and `resume` take the name, and `render list --name` finds it, so you need no file of job ids.
@@ -185,6 +186,8 @@ videodraft render stop # switch every GPU off whe
185
186
 
186
187
  Flags, outputs and the MCP flow (`cloud_render_*` tools): [references/cloud-render.md](references/cloud-render.md), or `videodraft skills show render`.
187
188
 
189
+ For building scenes with scripts, look-dev stills and many short Blender runs, or several projects at once, use a Cloud session: a cloud GPU machine a project keeps while it works (`videodraft render session start --name <project>`, then `push`, `run`, `pull`, and `render session blender` for the final frames). It pauses itself when idle and bills per second while on, at the same rate. Commands, limits and the MCP flow: [references/cloud-sessions.md](references/cloud-sessions.md), or `videodraft skills show sessions`.
190
+
188
191
  ## Prefer references when continuity matters
189
192
 
190
193
  Pure text-to-image or text-to-video is fine for a generic one-off asset. When a specific character, product, location, style, composition, or brand identity must survive generation, use references instead of hoping the prompt recreates it.
@@ -361,3 +364,4 @@ A hosted project is one JSON blob (script, storyboard scenes, shot cards, visual
361
364
  - [references/models.md](references/models.md) — choosing image/video models, pricing patterns, voices and styles
362
365
  - [references/examples.md](references/examples.md) — recipes: batch product videos from a CSV, talking-head from a script, changelog video in CI
363
366
  - [references/cloud-render.md](references/cloud-render.md): Cloud render commands, flags, exit codes, cost and the MCP flow
367
+ - [references/cloud-sessions.md](references/cloud-sessions.md): Cloud sessions, a GPU machine to work on: when to use one, commands, the machine, files and storage
@@ -2,6 +2,8 @@
2
2
 
3
3
  Cloud render renders the user's own `.blend` scene on cloud GPUs (NVIDIA RTX PRO 6000). Every job gets its own machine, so several jobs render at the same time; a machine starts on demand, takes the user's next job of its size when one is waiting, and switches itself off 1 minute after its last job. Waiting for a GPU is never billed. It generates nothing. Build or change the scene in Blender itself (in VideoDraft ADE, the `blender` app guide covers that); Cloud render only renders a saved file.
4
4
 
5
+ To build or change scenes with scripts, make look-dev stills, or run many short Blender jobs, use a Cloud session instead: a GPU machine a project keeps while it works. See [cloud-sessions.md](cloud-sessions.md).
6
+
5
7
  ## Commands
6
8
 
7
9
  ```bash
@@ -16,7 +18,7 @@ videodraft render list --name "S4 final"
16
18
  videodraft render cancel JOB_ID
17
19
  videodraft render resume JOB_ID
18
20
  videodraft render machine # each machine's phase, what you pay now, 24 h and all-time spend
19
- videodraft render stop # switch every GPU off now
21
+ videodraft render stop # every machine on the account off now, other agents' too
20
22
  ```
21
23
 
22
24
  `render blender` flags:
@@ -85,7 +87,7 @@ Each start has a one-minute minimum. So a short test job costs only a few credit
85
87
 
86
88
  Waiting for a GPU is free. A queued job may also have a machine starting, which is billed, or charges from an earlier attempt; check its phase and cost. If a GPU takes long, say Google is short of GPUs at the moment and the job keeps its place.
87
89
 
88
- Uploading and starting need a minimum balance; when only about two minutes of credit are left, every machine stops and the jobs pause. State the rate and get a go-ahead before long renders. When your task is finished, run `videodraft render stop` so idle time is not billed, unless the user still has renders queued.
90
+ Uploading and starting need a minimum balance; when only about two minutes of credit are left, every machine stops and the jobs pause. State the rate and get a go-ahead before long renders. Machines switch themselves off 1 minute after their last job, so there is nothing to stop when your task is done. `render stop` switches off every machine on the account, other agents' jobs and sessions included: run it only when the user asks.
89
91
 
90
92
  Never submit the same render twice to recover from a lost wait or a timeout: the first job keeps running and billing. Check `videodraft render list` (or `render list --name <name>`) and continue with `render wait`.
91
93
 
@@ -95,4 +97,4 @@ Never submit the same render twice to recover from a lost wait or a timeout: the
95
97
  2. PUT the bytes to `upload_url`: one PUT of the whole file, or chunks that are multiples of 256 KiB with `Content-Range: bytes <first>-<last>/<size>` (308 means send the next chunk from the Range header, 200 or 201 means complete). Then `cloud_render_finalize_scene` with the same `sha256`.
96
98
  3. `cloud_render_submit` with `scene_sha`, `start`, `end` and optional `name`, `gpu`, `fps`, `chunk`, `procs`, `blender_version`, `spot` (`auto` by default, or `never`).
97
99
  4. Poll `cloud_render_status` every 10 seconds or more. `message` and `machine.phase` distinguish a free GPU wait from billable start-up; a queued job's machine is a candidate that can change. `queued_seconds` includes time queued; `wait_seconds` gives the free wait when known. `machine.spot` is true on a Spot machine, `spot_note` explains Spot when the job asks for or runs on one, and `spot_reclaims` counts the times Google reclaimed its machine. `clip_url` is the finished MP4; `segment_urls` lists finished pieces before then; `cost` has the credits so far, `start_up_seconds`, `render_seconds` and `idle_seconds`, and `estimated_total_credits` (plus `estimated_minutes_left` while rendering).
98
- 5. `cloud_render_stop` when the work is done. `cloud_render_list` (with `name` to find jobs by name), `cloud_render_cancel`, `cloud_render_resume` and `cloud_render_machine` (each machine's `phase` and `billing`) match the CLI commands above.
100
+ 5. `cloud_render_stop` only when the user asks: it switches off every machine on the account, other agents' included. `cloud_render_list` (with `name` to find jobs by name), `cloud_render_cancel`, `cloud_render_resume` and `cloud_render_machine` (each machine's `phase` and `billing`) match the CLI commands above.
@@ -0,0 +1,59 @@
1
+ # Cloud sessions: a GPU machine to work on
2
+
3
+ A Cloud session is a cloud GPU machine (NVIDIA RTX PRO 6000, 96 GB) that you work on for a while: push files once, run shell commands and Blender scripts on it, pull results back, and render from it. Each project gets its own session, so several projects run at the same time without waiting on one local Blender.
4
+
5
+ ## Which to use
6
+
7
+ - **This computer's Blender**: quick edits and anything the user wants to watch or adjust in the Blender window.
8
+ - **A Cloud session**: building or changing scenes with scripts, look-dev stills, proofs, many short Blender runs, and several projects at once.
9
+ - **A Cloud render job** (`render session blender`, or `render blender` for a local file): the final frames, each job on its own GPU.
10
+
11
+ Cloud sessions and render jobs spend VideoDraft credits: state the rate (`videodraft render prices`) and get a go-ahead before the first one, as for renders.
12
+
13
+ ## Commands
14
+
15
+ ```bash
16
+ videodraft render session start --name film76 --no-wait # returns at once; the GPU wait is not billed
17
+ videodraft render session push film76 blender scripts --to project # upload while it starts
18
+ videodraft render session run film76 --cwd project "blender -b --factory-startup --python-exit-code 1 --python scripts/build.py && blender -b scene.blend --python-exit-code 1 --python scripts/stills.py" # waits for the machine
19
+ videodraft render session pull film76 project/stills --out media/stills # the stills land straight in media/stills
20
+ videodraft render session blender film76 project/scene.blend --frames 1-120 --name "film76 1-120" --no-wait
21
+ videodraft render session blender film76 project/scene.blend --frames 121-240 --name "film76 121-240" --no-wait
22
+ videodraft render session pause film76 # the render jobs do not need it; or release it
23
+ videodraft render wait "film76 1-120" --out media/renders/ # then the other range
24
+ videodraft render session snapshot film76 film76-v3 # a named copy of its files, kept 30 days
25
+ videodraft render session start --name film76b --from-snapshot film76-v3
26
+ videodraft render session release film76 # its files stay 30 days
27
+ videodraft render session delete film76 # or free them now
28
+ videodraft render session status film76
29
+ videodraft render session list # every session, and storage used of the cap
30
+ ```
31
+
32
+ `start` flags: `--name` (use it everywhere instead of the id; give each project its own), `--from-snapshot <name>`, `--idle-minutes <n>` (1 to 1440, default 15), `--budget <credits>` (pauses the session at that cost; saving and switching off add about a minute), `--no-spot`, `--no-wait`. Without `--no-wait`, `start` waits until the machine is ready.
33
+
34
+ ## How it works
35
+
36
+ - **Billing.** Per second while the machine is on, at the Cloud render rate. Waiting for a GPU is not billed, and neither is a paused session. A session asks for a regular GPU and, after about 2 minutes without one, a Spot GPU too, at the higher Spot rate (`--no-spot` waits for a regular one). Google can take a Spot machine back at any time: the session then pauses with what finished commands saved (a running command is cut off), and the next `run` resumes it.
37
+ - **Idle pause.** A session pauses itself after its idle minutes: billing stops, its files stay saved, and `resume` or the next `run` starts it on a new machine with them.
38
+ - **Files.** `push` sends files and folders by content: unchanged files are never uploaded again. A folder keeps its name under `--to` (`push s blender --to project` makes `project/blender/...`); a file lands as `--to/<file name>`. Pushes go to storage, not the machine, so they work while the session starts or is paused: start with `--no-wait` and push during the GPU wait. Commands start once the machine has the current files. `pull <folder>` puts that folder's files straight into `--out`; without a folder, everything comes with its session path.
39
+ - **The machine.** Linux with Blender 5.2 as `blender` (`$BLENDER`) and 4.5 as `$BLENDER_4_5`; Python 3 with NumPy, SciPy, OpenCV, Pillow and imageio; FFmpeg, ImageMagick, OpenEXR tools, git, curl, wget, 7-Zip, jq and common fonts. It reaches the web over HTTP and HTTPS, so scripts can download assets and `pip install --user` packages directly (much faster than pushing them from this computer). Commands run as a restricted user: no admin rights (no `apt`), and no access to the machine's credentials. Up to about 20 GB may be sent out to the internet per machine start; downloads are not counted.
40
+ - **The home folder.** Commands run with `HOME` in the session's `.home` folder, so what they install there (`pip install --user`, tools in `~/.local/bin`, Blender add-ons) is saved with the session, kept through pauses and snapshots. Caches are not saved. `pull` leaves `.home` out unless you name it.
41
+ - **Blender.** Run `blender -b --factory-startup --python-exit-code 1 --python script.py`: without `--python-exit-code 1`, a failing script still exits 0. `--factory-startup` resets the GPU settings, so every render script turns the GPU on itself:
42
+
43
+ ```python
44
+ prefs = bpy.context.preferences.addons["cycles"].preferences
45
+ prefs.compute_device_type = "OPTIX"
46
+ prefs.get_devices()
47
+ for d in prefs.devices:
48
+ d.use = d.type == "OPTIX"
49
+ bpy.context.scene.cycles.device = "GPU"
50
+ ```
51
+
52
+ Ignore Blender's `HIPEW initialization failed` warning; the GPU is NVIDIA.
53
+ - **Commands.** Up to 3 run at once. Each `run` takes about 15 s to start and 5 s to finish around the command itself, so chain short steps in one `run` with `&&`. `run` streams the output every few seconds (Python prints show sooner with `print(..., flush=True)`) and resumes a paused session first (`--no-resume` fails instead). `--detach` returns a command id for `logs <session> <id> [--follow]`; `--timeout <s>` stops a long one. A failed command makes `run` exit 1; the command's own exit code is in the output.
54
+ - **Saving.** What a command changes is saved when it ends; `sync` saves while something still runs. `pull`, `blender`, `scene` and `snapshot` see saved files only. Links (symlinks) are not saved.
55
+ - **Final renders.** `render session blender` renders a saved `.blend` from the session as a Cloud render job, with no upload from this computer. Like `render blender`, it renders that one file, so pack textures and other files into it first (`bpy.ops.file.pack_all()`) and make linked libraries local. Each job bills its own start-up and about a minute of idle after it, so split a film into ranges only when each range takes several minutes. Once the jobs are submitted, pause or release the session: they do not need it. `render session scene <session> <path>` prints a saved `.blend`'s `scene_sha` for MCP `cloud_render_submit`; a paused or released session works too.
56
+ - **Storage.** Each account has a storage cap for session files, snapshots and files kept after release; `session list` shows it. A push, start or resume past it is refused: `delete` sessions you no longer need, or delete snapshots (`snapshot-delete`). Files are kept 30 days after their last use.
57
+ - **Other agents.** Sessions are separated only by name; `session list` shows every session on the account. `render stop` switches off every machine on the account, other agents' sessions and jobs included (sessions save first): run it only when the user asks.
58
+
59
+ MCP: the same operations are the tools `cloud_session`, `cloud_session_files`, `cloud_session_command` and `cloud_session_snapshot`.