reelforge 0.4.1 → 0.4.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 +0 -2
- package/dist/commands/create.js +3 -17
- package/dist/commands/workflows.js +1 -1
- package/dist/index.js +0 -2
- package/package.json +1 -1
- package/dist/commands/videos.js +0 -52
package/README.md
CHANGED
|
@@ -79,8 +79,6 @@ Run `rf <command> --help` for full details on any of these.
|
|
|
79
79
|
| `tts voices [--locale zh]` | List supported Edge TTS voices |
|
|
80
80
|
| `images generate -p <prompt> -w <workflow>` | Image generation via ComfyUI / RunningHub |
|
|
81
81
|
| `images analyze -i <image>` | Reverse-describe an image |
|
|
82
|
-
| `videos generate -p <prompt> -w <workflow>` | Atomic video generation |
|
|
83
|
-
| `videos analyze -i <video>` | Reverse-describe a video |
|
|
84
82
|
|
|
85
83
|
### Content generation
|
|
86
84
|
|
package/dist/commands/create.js
CHANGED
|
@@ -15,8 +15,6 @@ function calcWorkflowUnits(wfKey) {
|
|
|
15
15
|
return 1;
|
|
16
16
|
if (base.startsWith("image_"))
|
|
17
17
|
return 3;
|
|
18
|
-
if (base.startsWith("video_"))
|
|
19
|
-
return 15;
|
|
20
18
|
if (base.startsWith("analyse_") || base.startsWith("analyze_"))
|
|
21
19
|
return 2;
|
|
22
20
|
return 3;
|
|
@@ -30,20 +28,13 @@ function estimateUnits(body) {
|
|
|
30
28
|
const tplBase = (tplKey.split("/").pop() || "").toLowerCase();
|
|
31
29
|
const tplType = tplBase.startsWith("static_")
|
|
32
30
|
? "static"
|
|
33
|
-
: tplBase.startsWith("
|
|
34
|
-
? "
|
|
35
|
-
:
|
|
36
|
-
? "video"
|
|
37
|
-
: tplBase.startsWith("asset_")
|
|
38
|
-
? "asset"
|
|
39
|
-
: "image";
|
|
31
|
+
: tplBase.startsWith("asset_")
|
|
32
|
+
? "asset"
|
|
33
|
+
: "image";
|
|
40
34
|
let mediaPerFrame = 0;
|
|
41
35
|
if (tplType === "image") {
|
|
42
36
|
mediaPerFrame = body.media_workflow ? calcWorkflowUnits(body.media_workflow) : 3;
|
|
43
37
|
}
|
|
44
|
-
else if (tplType === "video") {
|
|
45
|
-
mediaPerFrame = body.media_workflow ? calcWorkflowUnits(body.media_workflow) : 15;
|
|
46
|
-
}
|
|
47
38
|
const ttsMode = body.tts_inference_mode || (body.tts_workflow ? "comfyui" : "local");
|
|
48
39
|
const ttsPerFrame = ttsMode === "comfyui" ? 1 : 0;
|
|
49
40
|
const narrations = mode === "generate" ? 1 : 0;
|
|
@@ -400,11 +391,6 @@ export function registerCreate(program) {
|
|
|
400
391
|
" # Landscape (1920x1080)",
|
|
401
392
|
' rf create "..." --frame-template 1920x1080/image_default.html',
|
|
402
393
|
"",
|
|
403
|
-
" # AI-generated video background instead of still image",
|
|
404
|
-
' rf create "..." \\',
|
|
405
|
-
" --frame-template 1080x1920/video_default.html \\",
|
|
406
|
-
" --media-workflow runninghub/video_wan2.2.json",
|
|
407
|
-
"",
|
|
408
394
|
" # Add BGM",
|
|
409
395
|
' rf create "..." --bgm bgm/Echoes.mp3 --bgm-volume 0.3 --bgm-mode loop',
|
|
410
396
|
"",
|
|
@@ -11,7 +11,7 @@ export function registerWorkflows(program) {
|
|
|
11
11
|
.description("List all available workflows")
|
|
12
12
|
.helpOption("-h, --help", "show help")
|
|
13
13
|
.option("--source <src>", "filter by source: selfhost | runninghub")
|
|
14
|
-
.option("--kind <kind>", "filter by kind: image |
|
|
14
|
+
.option("--kind <kind>", "filter by kind: image | tts | analyse")
|
|
15
15
|
.action(async (opts) => {
|
|
16
16
|
const qs = new URLSearchParams();
|
|
17
17
|
if (opts.source)
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,6 @@ import { registerCreate } from "./commands/create.js";
|
|
|
17
17
|
import { registerLlm } from "./commands/llm.js";
|
|
18
18
|
import { registerTts } from "./commands/tts.js";
|
|
19
19
|
import { registerImages } from "./commands/images.js";
|
|
20
|
-
import { registerVideos } from "./commands/videos.js";
|
|
21
20
|
import { registerContent } from "./commands/content.js";
|
|
22
21
|
import { registerTemplates } from "./commands/templates.js";
|
|
23
22
|
import { registerFrames } from "./commands/frames.js";
|
|
@@ -80,7 +79,6 @@ registerCreate(program);
|
|
|
80
79
|
registerLlm(program);
|
|
81
80
|
registerTts(program);
|
|
82
81
|
registerImages(program);
|
|
83
|
-
registerVideos(program);
|
|
84
82
|
registerContent(program);
|
|
85
83
|
registerTemplates(program);
|
|
86
84
|
registerFrames(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reelforge",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "CLI for ReelForge Studio — AI video engine. Installs as both `reelforge` and the short alias `rf`. Every REST API exposed as a command, with --help on every level.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
package/dist/commands/videos.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { post } from "../client.js";
|
|
2
|
-
import { downloadTo } from "../utils/download.js";
|
|
3
|
-
import { print, success } from "../utils/output.js";
|
|
4
|
-
export function registerVideos(program) {
|
|
5
|
-
const videos = program
|
|
6
|
-
.command("videos")
|
|
7
|
-
.description("Atomic video generation and analysis via ComfyUI / RunningHub workflows")
|
|
8
|
-
.helpOption("-h, --help", "show help");
|
|
9
|
-
videos
|
|
10
|
-
.command("generate")
|
|
11
|
-
.description("Generate a video via a video_* workflow")
|
|
12
|
-
.helpOption("-h, --help", "show help")
|
|
13
|
-
.requiredOption("-p, --prompt <text>", "text prompt")
|
|
14
|
-
.requiredOption("-w, --workflow <key>", "workflow key, e.g. runninghub/video_wan2.2.json")
|
|
15
|
-
.option("--width <n>", "video width", parseInt)
|
|
16
|
-
.option("--height <n>", "video height", parseInt)
|
|
17
|
-
.option("--duration <s>", "target duration in seconds", parseFloat)
|
|
18
|
-
.option("--image <pathOrUrl>", "reference image (when the workflow accepts one)")
|
|
19
|
-
.option("-o, --output <file>", "download first video to this local path")
|
|
20
|
-
.addHelpText("after", [
|
|
21
|
-
"",
|
|
22
|
-
"Example:",
|
|
23
|
-
" reelforge videos generate -p 'astronaut riding a horse' -w runninghub/video_wan2.2.json --duration 4 -o out.mp4",
|
|
24
|
-
].join("\n"))
|
|
25
|
-
.action(async (opts) => {
|
|
26
|
-
const body = { prompt: opts.prompt, workflow: opts.workflow };
|
|
27
|
-
if (opts.width !== undefined)
|
|
28
|
-
body.width = opts.width;
|
|
29
|
-
if (opts.height !== undefined)
|
|
30
|
-
body.height = opts.height;
|
|
31
|
-
if (opts.duration !== undefined)
|
|
32
|
-
body.duration = opts.duration;
|
|
33
|
-
if (opts.image)
|
|
34
|
-
body.image = opts.image;
|
|
35
|
-
const r = await post("/api/v1/videos/generate", body);
|
|
36
|
-
if (opts.output && r.videos?.[0]) {
|
|
37
|
-
await downloadTo(r.videos[0], opts.output);
|
|
38
|
-
success(`Saved → ${opts.output}`);
|
|
39
|
-
}
|
|
40
|
-
print(r);
|
|
41
|
-
});
|
|
42
|
-
videos
|
|
43
|
-
.command("analyze")
|
|
44
|
-
.description("Reverse-describe a video using an analyse_video / video_understanding workflow")
|
|
45
|
-
.helpOption("-h, --help", "show help")
|
|
46
|
-
.requiredOption("-i, --video <pathOrUrl>", "video to analyze (local path or URL)")
|
|
47
|
-
.option("-w, --workflow <key>", "workflow key", "selfhost/analyse_video.json")
|
|
48
|
-
.action(async (opts) => {
|
|
49
|
-
const r = await post("/api/v1/videos/analyze", { video: opts.video, workflow: opts.workflow });
|
|
50
|
-
print(r);
|
|
51
|
-
});
|
|
52
|
-
}
|