@neta-art/cohub-cli 6.11.0 → 6.11.2
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/README.md +7 -1
- package/dist/commands/generations.js +5 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -256,6 +256,11 @@ cohub generate "keep the character identity from all reference images" \
|
|
|
256
256
|
--image reference_image=https://example.com/reference-1.png \
|
|
257
257
|
--image reference_image=https://example.com/reference-2.png
|
|
258
258
|
|
|
259
|
+
cohub generate "Lip-sync to this spoken take" \
|
|
260
|
+
--model seedance-2-0-fast \
|
|
261
|
+
--image reference_image=https://example.com/portrait.png \
|
|
262
|
+
--audio reference_audio=https://example.com/speech.mp3
|
|
263
|
+
|
|
259
264
|
cohub generate "a calm lake" \
|
|
260
265
|
--model <model> \
|
|
261
266
|
--async
|
|
@@ -273,9 +278,10 @@ Supported inputs:
|
|
|
273
278
|
--video <path-or-url>
|
|
274
279
|
--video reference_video=<path-or-url>
|
|
275
280
|
--audio <path-or-url>
|
|
281
|
+
--audio reference_audio=<path-or-url>
|
|
276
282
|
```
|
|
277
283
|
|
|
278
|
-
Role-qualified media values add `meta.role` to that content block. Repeat `--image reference_image=...` for multiple reference images. Seedance role-qualified media should use public URL inputs. Do not mix first/last frame roles with reference roles in one request.
|
|
284
|
+
Role-qualified media values add `meta.role` to that content block. Repeat `--image reference_image=...` for multiple reference images. Seedance role-qualified media should use public URL inputs. Do not mix first/last frame roles with reference roles (`reference_image`, `reference_video`, `reference_audio`) in one request.
|
|
279
285
|
|
|
280
286
|
Pass generation parameters with `--param key=value` or `--parameters '<json>'`.
|
|
281
287
|
|
|
@@ -5,11 +5,11 @@ import { createClient } from "../client.js";
|
|
|
5
5
|
import { resolveSpace } from "../space.js";
|
|
6
6
|
import { json as outJson, jsonRequested, ok, error, handleHttp, spinner } from "../output.js";
|
|
7
7
|
const frameMediaRoles = new Set(["first_frame", "last_frame"]);
|
|
8
|
-
const referenceMediaRoles = new Set(["reference_image", "reference_video"]);
|
|
8
|
+
const referenceMediaRoles = new Set(["reference_image", "reference_video", "reference_audio"]);
|
|
9
9
|
const rolesByMediaType = {
|
|
10
10
|
image: new Set([...frameMediaRoles, "reference_image"]),
|
|
11
11
|
video: new Set(["reference_video"]),
|
|
12
|
-
audio: new Set(),
|
|
12
|
+
audio: new Set(["reference_audio"]),
|
|
13
13
|
};
|
|
14
14
|
const mediaRoles = new Set([...frameMediaRoles, ...referenceMediaRoles]);
|
|
15
15
|
const mimeByExt = {
|
|
@@ -92,7 +92,7 @@ function validateMediaRoleModes(content) {
|
|
|
92
92
|
const hasFrameRole = roles.some((role) => frameMediaRoles.has(role));
|
|
93
93
|
const hasReferenceRole = roles.some((role) => referenceMediaRoles.has(role));
|
|
94
94
|
if (hasFrameRole && hasReferenceRole) {
|
|
95
|
-
error("Invalid media role mix", "Use first_frame/last_frame or reference_image/reference_video, not both.");
|
|
95
|
+
error("Invalid media role mix", "Use first_frame/last_frame or reference_image/reference_video/reference_audio, not both.");
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
async function saveOutputs(output, outputPath) {
|
|
@@ -237,7 +237,7 @@ export function registerGenerations(program) {
|
|
|
237
237
|
.requiredOption("-m, --model <model>", "Multimodal model ID from `cohub models ls --model-type multimodal`")
|
|
238
238
|
.option("--image <path-or-url>", "Image input file path or URL; prefix with first_frame=, last_frame=, or reference_image= when needed; repeatable", collect, [])
|
|
239
239
|
.option("--video <path-or-url>", "Video input file path or URL; prefix with reference_video= when needed; repeatable", collect, [])
|
|
240
|
-
.option("--audio <path-or-url>", "Audio input file path or URL; repeatable", collect, [])
|
|
240
|
+
.option("--audio <path-or-url>", "Audio input file path or URL; prefix with reference_audio= when needed; repeatable", collect, [])
|
|
241
241
|
.option("--param <key=value>", "Generation parameter; repeatable, values may be JSON/number/boolean", collect, [])
|
|
242
242
|
.option("--parameters <json>", "Generation parameters as a JSON object")
|
|
243
243
|
.option("--meta <json>", "Meta as a JSON object")
|
|
@@ -253,6 +253,7 @@ Examples:
|
|
|
253
253
|
COHUB_SPACE_ID=<space-id> cohub generate "Restyle this image" -m <model> --image input.png
|
|
254
254
|
cohub -s <space-id> generate "Smooth transition" -m seedance-2-0-fast --image first_frame=https://example.com/first.png --image last_frame=https://example.com/last.png
|
|
255
255
|
cohub -s <space-id> generate "Use these references" -m seedance-2-0-fast --image reference_image=https://example.com/a.png --image reference_image=https://example.com/b.png
|
|
256
|
+
cohub -s <space-id> generate "Lip-sync to the reference take" -m seedance-2-0-fast --image reference_image=https://example.com/portrait.png --audio reference_audio=https://example.com/speech.mp3
|
|
256
257
|
cohub -s <space-id> generate "A calm lake" -m <model> --async
|
|
257
258
|
`)
|
|
258
259
|
.action(async (prompt, opts) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neta-art/cohub-cli",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.2",
|
|
4
4
|
"description": "CLI for Cohub — spaces, sessions, and agent collaboration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"NOTICE"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@neta-art/generation": "^0.1.
|
|
18
|
+
"@neta-art/generation": "^0.1.28",
|
|
19
19
|
"commander": "^15.0.0",
|
|
20
20
|
"pixi.js": "^8.20.1",
|
|
21
21
|
"sharp": "^0.35.4",
|
|
22
|
-
"@neta-art/cohub": "8.
|
|
22
|
+
"@neta-art/cohub": "8.16.0"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|