@talesofai/neta-skills 0.14.3 → 0.15.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/CHANGELOG.md +6 -0
- package/bin/apis/artifact.js +16 -0
- package/bin/apis/index.js +3 -0
- package/bin/apis/oss.js +22 -0
- package/bin/cli.js +0 -0
- package/bin/commands/creative/upload.cmd.en_us.yml +10 -0
- package/bin/commands/creative/upload.cmd.js +192 -0
- package/bin/commands/creative/upload.cmd.zh_cn.yml +10 -0
- package/package.json +18 -17
- package/skills/neta-creative/SKILL.md +11 -0
- package/skills/neta-creative/references/collection-remix.md +3 -0
- package/skills/neta-creative/references/image-generation.md +10 -3
- package/skills/neta-creative/references/media-upload.md +101 -0
- package/skills/neta-creative/references/song-mv.md +4 -0
- package/skills/neta-creative/references/video-generation.md +3 -0
- package/skills/zh_cn/neta/SKILL.md +1 -0
- package/skills/zh_cn/neta-creative/SKILL.md +13 -1
- package/skills/zh_cn/neta-creative/references/collection-remix.md +5 -1
- package/skills/zh_cn/neta-creative/references/image-generation.md +10 -3
- package/skills/zh_cn/neta-creative/references/media-upload.md +103 -0
- package/skills/zh_cn/neta-creative/references/song-mv.md +5 -0
- package/skills/zh_cn/neta-creative/references/video-generation.md +3 -0
package/CHANGELOG.md
CHANGED
package/bin/apis/artifact.js
CHANGED
|
@@ -51,6 +51,20 @@ export const createArtifactApis = (client) => {
|
|
|
51
51
|
})
|
|
52
52
|
.then((res) => res.data);
|
|
53
53
|
};
|
|
54
|
+
const createPicture = (data) => {
|
|
55
|
+
return client
|
|
56
|
+
.post(`/v1/artifact/picture`, {
|
|
57
|
+
url: data.url,
|
|
58
|
+
})
|
|
59
|
+
.then((res) => res.data);
|
|
60
|
+
};
|
|
61
|
+
const createVideo = (data) => {
|
|
62
|
+
return client
|
|
63
|
+
.post(`/v1/artifact/video`, {
|
|
64
|
+
url: data.url,
|
|
65
|
+
})
|
|
66
|
+
.then((res) => res.data);
|
|
67
|
+
};
|
|
54
68
|
return {
|
|
55
69
|
makeImage,
|
|
56
70
|
makeVideo,
|
|
@@ -60,5 +74,7 @@ export const createArtifactApis = (client) => {
|
|
|
60
74
|
postProcess,
|
|
61
75
|
task,
|
|
62
76
|
artifactDetail,
|
|
77
|
+
createPicture,
|
|
78
|
+
createVideo,
|
|
63
79
|
};
|
|
64
80
|
};
|
package/bin/apis/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { createConfigApis } from "./config.js";
|
|
|
9
9
|
import { createFeedsApis } from "./feeds.js";
|
|
10
10
|
import { createGptApis } from "./gpt.js";
|
|
11
11
|
import { createHashtagApis, } from "./hashtag.js";
|
|
12
|
+
import { createOssApis } from "./oss.js";
|
|
12
13
|
import { createPromptApis } from "./prompt.js";
|
|
13
14
|
import { createRecsysApis } from "./recsys.js";
|
|
14
15
|
import { createSpaceApis } from "./space.js";
|
|
@@ -63,6 +64,7 @@ export const createApis = (option) => {
|
|
|
63
64
|
const recsys = createRecsysApis(client);
|
|
64
65
|
const travelCampaign = createTravelCampaignApis(client);
|
|
65
66
|
const commerce = createCommerceApis(client);
|
|
67
|
+
const oss = createOssApis(client);
|
|
66
68
|
return {
|
|
67
69
|
baseUrl,
|
|
68
70
|
tcp,
|
|
@@ -82,5 +84,6 @@ export const createApis = (option) => {
|
|
|
82
84
|
recsys,
|
|
83
85
|
travelCampaign,
|
|
84
86
|
commerce,
|
|
87
|
+
oss,
|
|
85
88
|
};
|
|
86
89
|
};
|
package/bin/apis/oss.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const createOssApis = (client) => {
|
|
2
|
+
const getStsCredentials = async (suffix) => {
|
|
3
|
+
const res = await client.get("/v1/oss/sts-upload-token", {
|
|
4
|
+
params: {
|
|
5
|
+
suffix,
|
|
6
|
+
},
|
|
7
|
+
});
|
|
8
|
+
return res.data;
|
|
9
|
+
};
|
|
10
|
+
const getVideoStsCredentials = async (suffix) => {
|
|
11
|
+
const res = await client.get("/v1/oss/anonymous-upload-token", {
|
|
12
|
+
params: {
|
|
13
|
+
suffix,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
return res.data;
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
getStsCredentials,
|
|
20
|
+
getVideoStsCredentials,
|
|
21
|
+
};
|
|
22
|
+
};
|
package/bin/cli.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
name: upload
|
|
2
|
+
title: Media File Upload
|
|
3
|
+
description: Upload a media file (image or video) to create a media artifact.
|
|
4
|
+
|
|
5
|
+
parameters:
|
|
6
|
+
file_path: Media file path (absolute path or relative path to command execution directory)
|
|
7
|
+
|
|
8
|
+
errors:
|
|
9
|
+
file_type_not_supported: Media file type not supported
|
|
10
|
+
file_size_too_large: Media file size too large, maximum size is {max_size} bytes
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { CompleteMultipartUploadCommand, CreateMultipartUploadCommand, S3Client, UploadPartCommand, } from "@aws-sdk/client-s3";
|
|
3
|
+
import { Type } from "@sinclair/typebox";
|
|
4
|
+
import { filetypeinfo } from "magic-bytes.js";
|
|
5
|
+
import plimit from "p-limit";
|
|
6
|
+
import { parseMeta } from "../../utils/parse_meta.js";
|
|
7
|
+
import { polling } from "../../utils/polling.js";
|
|
8
|
+
import { createCommand } from "../factory.js";
|
|
9
|
+
const OSS_STS_OPTIONS_CN = {
|
|
10
|
+
bucket: "talesofai",
|
|
11
|
+
region: "oss-cn-shanghai",
|
|
12
|
+
endpoint: "oss.talesofai.cn",
|
|
13
|
+
};
|
|
14
|
+
const OSS_STS_OPTIONS_US = {
|
|
15
|
+
bucket: "talesofai-us",
|
|
16
|
+
region: "oss-us-west-1",
|
|
17
|
+
endpoint: "oss.talesofai.com",
|
|
18
|
+
};
|
|
19
|
+
const DEFAULT_IMAGE_LIMIT_SIZE = 1024 * 1024 * 10;
|
|
20
|
+
const DEFAULT_VIDEO_LIMIT_SIZE = 1024 * 1024 * 100;
|
|
21
|
+
const SUPPORTED_IMAGE_TYPES = ["png", "jpeg", "webp", "gif"];
|
|
22
|
+
const SUPPORTED_VIDEO_TYPES = [
|
|
23
|
+
"avi",
|
|
24
|
+
"mov",
|
|
25
|
+
"flv",
|
|
26
|
+
"mkv",
|
|
27
|
+
"webm",
|
|
28
|
+
"mp4",
|
|
29
|
+
"mpeg",
|
|
30
|
+
"wmv",
|
|
31
|
+
"rm",
|
|
32
|
+
"vob",
|
|
33
|
+
"ts",
|
|
34
|
+
];
|
|
35
|
+
const meta = parseMeta(Type.Object({
|
|
36
|
+
name: Type.String(),
|
|
37
|
+
title: Type.String(),
|
|
38
|
+
description: Type.String(),
|
|
39
|
+
parameters: Type.Object({
|
|
40
|
+
file_path: Type.String(),
|
|
41
|
+
}),
|
|
42
|
+
errors: Type.Object({
|
|
43
|
+
file_type_not_supported: Type.String(),
|
|
44
|
+
file_size_too_large: Type.String(),
|
|
45
|
+
}),
|
|
46
|
+
}), import.meta);
|
|
47
|
+
const s3Upload = async (data, options) => {
|
|
48
|
+
const { mimeType, regionOptions, credentials, logger } = options;
|
|
49
|
+
const { bucket, region, endpoint } = regionOptions;
|
|
50
|
+
const { access_key_id, access_key_secret, security_token, expiration, path } = credentials;
|
|
51
|
+
const now = Date.now();
|
|
52
|
+
const expires = new Date(expiration).getTime();
|
|
53
|
+
if (now > expires) {
|
|
54
|
+
throw new Error("STS token expired");
|
|
55
|
+
}
|
|
56
|
+
const client = new S3Client({
|
|
57
|
+
region,
|
|
58
|
+
credentials: {
|
|
59
|
+
accessKeyId: access_key_id,
|
|
60
|
+
secretAccessKey: access_key_secret,
|
|
61
|
+
sessionToken: security_token,
|
|
62
|
+
},
|
|
63
|
+
endpoint: `https://${region}.aliyuncs.com`,
|
|
64
|
+
});
|
|
65
|
+
const createMultipartUploadCommand = new CreateMultipartUploadCommand({
|
|
66
|
+
Bucket: bucket,
|
|
67
|
+
Key: path,
|
|
68
|
+
ContentType: mimeType,
|
|
69
|
+
});
|
|
70
|
+
const createMultipartUploadResponse = await client.send(createMultipartUploadCommand);
|
|
71
|
+
const uploadId = createMultipartUploadResponse.UploadId;
|
|
72
|
+
const partSize = 1 * 1024 * 1024;
|
|
73
|
+
const parts = Math.ceil(data.length / partSize);
|
|
74
|
+
const tasks = [];
|
|
75
|
+
let uploadedSize = 0;
|
|
76
|
+
for (let i = 0; i < parts; i++) {
|
|
77
|
+
const start = i * partSize;
|
|
78
|
+
const end = Math.min(start + partSize, data.length);
|
|
79
|
+
const partData = data.subarray(start, end);
|
|
80
|
+
const uploadPartCommand = new UploadPartCommand({
|
|
81
|
+
Bucket: bucket,
|
|
82
|
+
Key: path,
|
|
83
|
+
PartNumber: i + 1,
|
|
84
|
+
UploadId: uploadId,
|
|
85
|
+
Body: partData,
|
|
86
|
+
});
|
|
87
|
+
const uploadPart = async (partNumber) => {
|
|
88
|
+
const res = await client.send(uploadPartCommand);
|
|
89
|
+
uploadedSize += partData.length;
|
|
90
|
+
logger.debug("uploaded %d bytes, part %d", uploadedSize, partNumber);
|
|
91
|
+
return res;
|
|
92
|
+
};
|
|
93
|
+
tasks.push(uploadPart);
|
|
94
|
+
}
|
|
95
|
+
const limit = plimit(8);
|
|
96
|
+
const completedParts = await Promise.all(tasks.map((run, index) => limit(() => run(index + 1).then((res) => ({
|
|
97
|
+
ETag: res.ETag,
|
|
98
|
+
PartNumber: index + 1,
|
|
99
|
+
})))));
|
|
100
|
+
const completeMultipartUploadCommand = new CompleteMultipartUploadCommand({
|
|
101
|
+
Bucket: bucket,
|
|
102
|
+
Key: path,
|
|
103
|
+
UploadId: uploadId,
|
|
104
|
+
MultipartUpload: {
|
|
105
|
+
Parts: completedParts,
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
await client.send(completeMultipartUploadCommand);
|
|
109
|
+
const url = `https://${endpoint}/${path}`;
|
|
110
|
+
logger.debug("completed multipart upload, url: %s", url);
|
|
111
|
+
return url;
|
|
112
|
+
};
|
|
113
|
+
const createArtifact = async (url, options) => {
|
|
114
|
+
const { type, apis, logger } = options;
|
|
115
|
+
let uuid;
|
|
116
|
+
if (type === "image") {
|
|
117
|
+
const res = await apis.artifact.createPicture({ url });
|
|
118
|
+
uuid = res.uuid;
|
|
119
|
+
}
|
|
120
|
+
if (type === "video") {
|
|
121
|
+
const res = await apis.artifact.createVideo({ url });
|
|
122
|
+
uuid = res.uuid;
|
|
123
|
+
}
|
|
124
|
+
const res = await polling(() => apis.artifact.artifactDetail([uuid]), (result) => {
|
|
125
|
+
const artifact = result[0];
|
|
126
|
+
if (!artifact)
|
|
127
|
+
throw new Error("Artifact not found");
|
|
128
|
+
logger.debug("polling: %o", artifact);
|
|
129
|
+
return artifact.status !== "PENDING" && artifact.status !== "MODERATION";
|
|
130
|
+
}, 1000, 60 * 1000);
|
|
131
|
+
if (res.isTimeout) {
|
|
132
|
+
throw new Error("Timeout");
|
|
133
|
+
}
|
|
134
|
+
// biome-ignore lint/style/noNonNullAssertion: checked
|
|
135
|
+
return res.result[0];
|
|
136
|
+
};
|
|
137
|
+
export const upload = createCommand({
|
|
138
|
+
name: meta.name,
|
|
139
|
+
title: meta.title,
|
|
140
|
+
description: meta.description,
|
|
141
|
+
inputSchema: Type.Object({
|
|
142
|
+
file_path: Type.String({ description: meta.parameters.file_path }),
|
|
143
|
+
}),
|
|
144
|
+
}, async ({ file_path }, { apis, user, log }) => {
|
|
145
|
+
if (!user) {
|
|
146
|
+
throw new Error("Not authenticated. Please check your NETA_TOKEN.");
|
|
147
|
+
}
|
|
148
|
+
const regionOptions = apis.baseUrl.endsWith(".cn")
|
|
149
|
+
? OSS_STS_OPTIONS_CN
|
|
150
|
+
: OSS_STS_OPTIONS_US;
|
|
151
|
+
const file = await readFile(file_path);
|
|
152
|
+
const infos = filetypeinfo(file);
|
|
153
|
+
const info = infos[0]; // always use first extension
|
|
154
|
+
if (!info || !info.extension || !info.mime) {
|
|
155
|
+
throw new Error(meta.errors.file_type_not_supported);
|
|
156
|
+
}
|
|
157
|
+
if (SUPPORTED_IMAGE_TYPES.includes(info.extension)) {
|
|
158
|
+
if (file.length > DEFAULT_IMAGE_LIMIT_SIZE) {
|
|
159
|
+
throw new Error(meta.errors.file_size_too_large.replace("{max_size}", DEFAULT_IMAGE_LIMIT_SIZE.toString()));
|
|
160
|
+
}
|
|
161
|
+
const credentials = await apis.oss.getStsCredentials(info.extension);
|
|
162
|
+
const url = await s3Upload(file, {
|
|
163
|
+
mimeType: info.mime,
|
|
164
|
+
regionOptions: regionOptions,
|
|
165
|
+
credentials,
|
|
166
|
+
logger: log,
|
|
167
|
+
});
|
|
168
|
+
return createArtifact(url, {
|
|
169
|
+
type: "image",
|
|
170
|
+
apis,
|
|
171
|
+
logger: log,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (SUPPORTED_VIDEO_TYPES.includes(info.extension)) {
|
|
175
|
+
if (file.length > DEFAULT_VIDEO_LIMIT_SIZE) {
|
|
176
|
+
throw new Error(meta.errors.file_size_too_large.replace("{max_size}", DEFAULT_VIDEO_LIMIT_SIZE.toString()));
|
|
177
|
+
}
|
|
178
|
+
const credentials = await apis.oss.getVideoStsCredentials(info.extension);
|
|
179
|
+
const url = await s3Upload(file, {
|
|
180
|
+
mimeType: info.mime,
|
|
181
|
+
regionOptions: regionOptions,
|
|
182
|
+
credentials,
|
|
183
|
+
logger: log,
|
|
184
|
+
});
|
|
185
|
+
return createArtifact(url, {
|
|
186
|
+
type: "video",
|
|
187
|
+
apis,
|
|
188
|
+
logger: log,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
throw new Error(meta.errors.file_type_not_supported);
|
|
192
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@talesofai/neta-skills",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "Neta API pi coding agent skills for interacting with Neta API to generate images, videos, songs, and manage characters/elements.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -25,24 +25,11 @@
|
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=22.0.0"
|
|
27
27
|
},
|
|
28
|
-
"packageManager": "pnpm@10.25.0",
|
|
29
28
|
"bin": {
|
|
30
29
|
"neta-cli": "bin/cli.js"
|
|
31
30
|
},
|
|
32
|
-
"scripts": {
|
|
33
|
-
"lint": "biome check . --write --unsafe",
|
|
34
|
-
"validate": "skills-ref to-prompt ./skills/neta ./skills/neta-community ./skills/neta-creative ./skills/neta-suggest ./skills/neta-space ./skills/neta-character ./skills/neta-elementum ./skills/neta-adventure",
|
|
35
|
-
"type-check": "tsc --noEmit",
|
|
36
|
-
"check": "pnpm lint && pnpm type-check && pnpm validate",
|
|
37
|
-
"changelog": "changeset",
|
|
38
|
-
"bump": "changeset version",
|
|
39
|
-
"prepare": "husky",
|
|
40
|
-
"build": "rimraf bin && tsc",
|
|
41
|
-
"postbuild": "node scripts/postbuild.js",
|
|
42
|
-
"dev": "NODE_ENV=development node src/cli.ts",
|
|
43
|
-
"start": "node bin/cli.js"
|
|
44
|
-
},
|
|
45
31
|
"dependencies": {
|
|
32
|
+
"@aws-sdk/client-s3": "^3.1013.0",
|
|
46
33
|
"@commander-js/extra-typings": "^14.0.0",
|
|
47
34
|
"@sinclair/typebox": "^0.34.48",
|
|
48
35
|
"axios": "^1.7.9",
|
|
@@ -50,7 +37,9 @@
|
|
|
50
37
|
"dayjs": "^1.11.20",
|
|
51
38
|
"dotenv": "^16.4.7",
|
|
52
39
|
"dotenv-flow": "^4.1.0",
|
|
40
|
+
"magic-bytes.js": "^1.13.0",
|
|
53
41
|
"os-locale": "^8.0.0",
|
|
42
|
+
"p-limit": "^7.3.0",
|
|
54
43
|
"qs": "^6.15.0",
|
|
55
44
|
"skills-ref": "^0.1.5",
|
|
56
45
|
"yaml": "^2.8.2"
|
|
@@ -74,5 +63,17 @@
|
|
|
74
63
|
"README.zh_cn.md",
|
|
75
64
|
"CHANGELOG.md",
|
|
76
65
|
"LICENSE"
|
|
77
|
-
]
|
|
78
|
-
|
|
66
|
+
],
|
|
67
|
+
"scripts": {
|
|
68
|
+
"lint": "biome check . --write --unsafe",
|
|
69
|
+
"validate": "skills-ref to-prompt ./skills/neta ./skills/neta-community ./skills/neta-creative ./skills/neta-suggest ./skills/neta-space ./skills/neta-character ./skills/neta-elementum ./skills/neta-adventure",
|
|
70
|
+
"type-check": "tsc --noEmit",
|
|
71
|
+
"check": "pnpm lint && pnpm type-check && pnpm validate",
|
|
72
|
+
"changelog": "changeset",
|
|
73
|
+
"bump": "changeset version",
|
|
74
|
+
"build": "rimraf bin && tsc",
|
|
75
|
+
"postbuild": "node scripts/postbuild.js",
|
|
76
|
+
"dev": "NODE_ENV=development node src/cli.ts",
|
|
77
|
+
"start": "node bin/cli.js"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -55,6 +55,16 @@ Combine an audio track and video to create a full MV.
|
|
|
55
55
|
npx -y @talesofai/neta-skills@latest remove_background --input_image "image_artifact_uuid"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
**Upload local image or video**
|
|
59
|
+
|
|
60
|
+
Registers a file from disk as a Neta artifact (after upload and moderation). Use the returned **`uuid`** or **`url`** in `make_image` (`ref_img-…`), `make_video` (`--image_source` URL), `remove_background`, or collection commands.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "/path/to/file.png"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
📖 [Media upload](./references/media-upload.md) — supported types, size limits, and how outputs map to each downstream command.
|
|
67
|
+
|
|
58
68
|
### Character queries
|
|
59
69
|
|
|
60
70
|
**Search characters**
|
|
@@ -137,6 +147,7 @@ npx -y @talesofai/neta-skills@latest pay_premium_order --order_uuid "order-uuid"
|
|
|
137
147
|
| 🎬 Video generation | [video-generation.md](./references/video-generation.md) |
|
|
138
148
|
| 🎵 Song generation | [song-creation.md](./references/song-creation.md) |
|
|
139
149
|
| 🎞️ MV creation | [song-mv.md](./references/song-mv.md) |
|
|
150
|
+
| 📤 Local media upload | [media-upload.md](./references/media-upload.md) |
|
|
140
151
|
| 👤 Character queries | [character-search.md](./references/character-search.md) |
|
|
141
152
|
| 🖊️ Creative remixing | [collection-remix.md](./references/collection-remix.md) |
|
|
142
153
|
| ⭐ Premium / subscribe | [premium.md](./references/premium.md) |
|
|
@@ -38,9 +38,12 @@ You will typically use the following commands for remix workflows:
|
|
|
38
38
|
- `make_video`
|
|
39
39
|
- `make_song`
|
|
40
40
|
|
|
41
|
+
If the user supplies **local images or videos** that are not in the collection payload, run **`upload`** first, then reference picture artifacts with **`ref_img-<uuid>`** in `make_image` or the artifact **`url`** in `make_video`. See [Media upload](./media-upload.md).
|
|
42
|
+
|
|
41
43
|
📖 See also:
|
|
42
44
|
|
|
43
45
|
- [Generate Images](./image-generation.md)
|
|
44
46
|
- [Generate Videos](./video-generation.md)
|
|
45
47
|
- [Generate Songs](./song-creation.md)
|
|
48
|
+
- [Media upload](./media-upload.md)
|
|
46
49
|
|
|
@@ -10,7 +10,7 @@ Applicable to `make_image` and `remove_background` commands.
|
|
|
10
10
|
|
|
11
11
|
- **Characters**: Use characters in the format "@character_name", e.g., "@character_name". The character name must be an exact string match—no modifications, no spaces, no simplified/traditional Chinese conversion. This reference contains the character's complete visual information.
|
|
12
12
|
- **Image Elements**: Use built-in image elements in the format "/element_name", e.g., "/comic_style".
|
|
13
|
-
- **Reference Images**: When using the 8_image_edit model,
|
|
13
|
+
- **Reference Images**: When using the 8_image_edit model, reference existing picture artifacts with the pattern **`ref_img-<uuid>`**, e.g. `ref_img-1234567890` (matches the CLI prompt parser). A maximum of 14 images is supported.
|
|
14
14
|
- **Chinese Natural Language Phrases**: Descriptive text composed of short phrases depicting the scene. If no character is referenced, describe the character's appearance within the natural language phrases.
|
|
15
15
|
|
|
16
16
|
**Recommended Format:**
|
|
@@ -23,10 +23,10 @@ Applicable to `make_image` and `remove_background` commands.
|
|
|
23
23
|
- Image elements must appear in the format "/name", e.g., "/comic_style"
|
|
24
24
|
- For the 8_image_edit model, provide more context and intent. Describe the scene rather than just listing keywords. This model's core strength lies in its deep language understanding. Narrative descriptive paragraphs almost always generate better, more coherent images compared to strings of unrelated words
|
|
25
25
|
- You can search for available characters or elements using search_character_or_elementum, and verify their availability using request_character_or_elementum before use
|
|
26
|
-
- Reference images must
|
|
26
|
+
- Reference images must use **`ref_img-<uuid>`** (artifact UUID). Sources include **`upload`** (local files), **`make_image` / `read_collection` outputs**, or other picture artifacts the user already owns
|
|
27
27
|
- When referencing characters or elements, add spaces or commas before and after, e.g., "@Neta#996, /comic_style, walking in school"
|
|
28
28
|
- For image modifications and other generations related to referencing the original image, be sure to use reference images with the 8_image_edit model
|
|
29
|
-
- Example (referencing characters and elements): @Neta#996, /comic_style,
|
|
29
|
+
- Example (referencing characters and elements): @Neta#996, /comic_style, ref_img-uuid, ref_img-uuid, phrase1, phrase2…
|
|
30
30
|
- **When a specific character exists, use the character via @character_name rather than re-describing the character's appearance**
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -89,6 +89,12 @@ npx -y @talesofai/neta-skills@latest make_image \
|
|
|
89
89
|
|
|
90
90
|
---
|
|
91
91
|
|
|
92
|
+
## Local files as reference images
|
|
93
|
+
|
|
94
|
+
If the user’s image only exists **on disk**, run **`upload`** first, then use the returned artifact UUID in the prompt as `ref_img-<uuid>`. Formats, size limits, and mapping to `make_video` / `remove_background` are documented in [Media upload](./media-upload.md).
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
92
98
|
## Common Use Cases
|
|
93
99
|
|
|
94
100
|
### Character Standing Illustration
|
|
@@ -163,3 +169,4 @@ npx -y @talesofai/neta-skills@latest remove_background --input_image "image_arti
|
|
|
163
169
|
|
|
164
170
|
- [Character Search](./character-search.md) - Get character standard information
|
|
165
171
|
- [Video Generation](./video-generation.md) - Convert images to dynamic videos
|
|
172
|
+
- [Media upload](./media-upload.md) - Local files → artifacts for reference / video / cutout
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Uploading user media (local files)
|
|
2
|
+
|
|
3
|
+
Use the `upload` command when the user has **image or video files on disk** that must become Neta **artifacts** before other creative commands can reference them. The CLI reads the file, uploads it via STS to object storage, registers it as a picture or video artifact, and polls until processing leaves `PENDING` / `MODERATION`.
|
|
4
|
+
|
|
5
|
+
**Command**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "/absolute/or/relative/path/to/file.png"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**Requirements**
|
|
12
|
+
|
|
13
|
+
- **`NETA_TOKEN`** must be set (same as other authenticated commands). Unauthenticated runs fail with an explicit error.
|
|
14
|
+
- **`file_path`**: absolute path, or path relative to the **current working directory** when the command runs.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Supported formats and limits
|
|
19
|
+
|
|
20
|
+
Detection uses file **magic bytes** (not only the extension). Unsupported or unrecognised types raise `file_type_not_supported`.
|
|
21
|
+
|
|
22
|
+
| Kind | Extensions (examples) | Default max size |
|
|
23
|
+
|--------|------------------------|------------------|
|
|
24
|
+
| Image | `png`, `jpeg`, `webp`, `gif` | 10 MiB |
|
|
25
|
+
| Video | `avi`, `mov`, `flv`, `mkv`, `webm`, `mp4`, `mpeg`, `wmv`, `rm`, `vob`, `ts` | 100 MiB |
|
|
26
|
+
|
|
27
|
+
Oversized files raise `file_size_too_large`.
|
|
28
|
+
|
|
29
|
+
**Region / bucket**: the implementation picks CN vs US OSS settings from the API base URL (`.cn` vs default). You normally do not configure this in the skill.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Command output
|
|
34
|
+
|
|
35
|
+
On success, the command returns an **artifact detail** object (same shape as other artifact APIs), including at least:
|
|
36
|
+
|
|
37
|
+
- **`uuid`**: stable artifact id — use this anywhere a command expects an artifact UUID (see below).
|
|
38
|
+
- **`url`**: public URL for the asset when available — use for parameters that expect an **image URL** (e.g. `make_video --image_source`).
|
|
39
|
+
- **`modality`**, **`status`**, and optional `image_detail` / `video_detail`.
|
|
40
|
+
|
|
41
|
+
Wait until the command finishes; it already waits through upload and moderation polling (timeout can still occur on very slow jobs — treat as a hard error and retry or narrow the file).
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Where uploaded artifacts are used in the creative skill
|
|
46
|
+
|
|
47
|
+
These are the **neta-creative** flows that consume **user-origin** content once it exists as an artifact (via `upload`, or via prior generation / `read_collection`).
|
|
48
|
+
|
|
49
|
+
| Goal | Command | What to pass from `upload` result |
|
|
50
|
+
|------|---------|-----------------------------------|
|
|
51
|
+
| Image edit / multi-reference generation (`8_image_edit`) | `make_image` | Put **`ref_img-<uuid>`** in the prompt (up to 14). See [Image generation](./image-generation.md). |
|
|
52
|
+
| Image → video | `make_video` | **`--image_source`** = the artifact’s **`url`** (string URL), not the bare UUID. See [Video generation](./video-generation.md). |
|
|
53
|
+
| Transparent background | `remove_background`, `remove_background_nocrop` | **`--input_image`** = artifact **`uuid`**. See [Image generation](./image-generation.md) (background removal). |
|
|
54
|
+
| Remix / reference from a work | `read_collection` | Collection payloads may include reference images; local files are not injected directly — **upload first**, then use `ref_img-<uuid>` in `make_image` if you need them in-prompt. See [Creative remix](./collection-remix.md). |
|
|
55
|
+
| Publish or update a collection with specific assets | `publish_collection`, `edit_collection` | **`artifacts`**: comma-separated picture **UUIDs** (1–12). Upload images first, then pass their UUIDs. |
|
|
56
|
+
|
|
57
|
+
**`make_song`** does not take image or video uploads; for MVs you still combine song + `make_image` / `make_video` as in [Song MV](./song-mv.md). Use **`upload`** when the cover or plate still lives only as a local file.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Suggested workflows
|
|
62
|
+
|
|
63
|
+
### Local photo → video
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "./still.png"
|
|
67
|
+
# From JSON output, copy "url" for image_source and/or "uuid" for other steps.
|
|
68
|
+
|
|
69
|
+
npx -y @talesofai/neta-skills@latest make_video \
|
|
70
|
+
--image_source "<URL_FROM_UPLOAD_OUTPUT>" \
|
|
71
|
+
--prompt "Gentle breathing, slight hair movement, soft light." \
|
|
72
|
+
--model "model_s"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Local image → edit with `8_image_edit`
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "./reference.jpg"
|
|
79
|
+
|
|
80
|
+
npx -y @talesofai/neta-skills@latest make_image \
|
|
81
|
+
--prompt "ref_img-<UUID_FROM_UPLOAD_OUTPUT>, change outfit to winter coat, keep pose and background" \
|
|
82
|
+
--aspect "3:4" \
|
|
83
|
+
--model_series "8_image_edit"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Local image → cutout
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "./character.png"
|
|
90
|
+
|
|
91
|
+
npx -y @talesofai/neta-skills@latest remove_background --input_image "<UUID_FROM_UPLOAD_OUTPUT>"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Related docs
|
|
97
|
+
|
|
98
|
+
- [Image generation](./image-generation.md) — `ref_img-` prompt syntax, models, background removal.
|
|
99
|
+
- [Video generation](./video-generation.md) — `image_source` and motion prompts.
|
|
100
|
+
- [Song MV](./song-mv.md) — combining audio and visuals.
|
|
101
|
+
- [Creative remix](./collection-remix.md) — using `read_collection` with generation commands.
|
|
@@ -158,6 +158,10 @@ npx -y @talesofai/neta-skills@latest make_video --image_source "<URL3>" --prompt
|
|
|
158
158
|
- Use `16:9` aspect ratio for images.
|
|
159
159
|
- Works well for mainstream video platforms.
|
|
160
160
|
|
|
161
|
+
### Local cover or key art
|
|
162
|
+
|
|
163
|
+
If the user already has a cover image file, **`upload`** it and pass the returned **`url`** into `make_video --image_source` (or use `ref_img-<uuid>` in `make_image` when compositing). Details: [Media upload](./media-upload.md).
|
|
164
|
+
|
|
161
165
|
### Model selection
|
|
162
166
|
|
|
163
167
|
- Prototyping: `model_s` (faster).
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Applies to the `make_video` command.
|
|
4
4
|
|
|
5
|
+
**User-uploaded stills:** `make_video --image_source` expects an **image URL** string. After **`upload`**, use the artifact’s **`url`** field from the command output (not the bare UUID). See [Media upload](./media-upload.md).
|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## Prompt principles
|
|
@@ -238,5 +240,6 @@ She slowly blinks, the corners of her mouth lifting slightly, strands of hair sw
|
|
|
238
240
|
## Related docs
|
|
239
241
|
|
|
240
242
|
- [Image generation](./image-generation.md) — generating still images for video conversion.
|
|
243
|
+
- [Media upload](./media-upload.md) — using local stills as `image_source`.
|
|
241
244
|
- [Song MV](./song-mv.md) — combining songs and videos to build full music videos.
|
|
242
245
|
|
|
@@ -20,8 +20,9 @@ description: Neta API 创作技能——生成图片、视频、歌曲、MV,
|
|
|
20
20
|
|
|
21
21
|
**生成图片**
|
|
22
22
|
```bash
|
|
23
|
-
npx -y @talesofai/neta-skills@latest make_image --prompt "
|
|
23
|
+
npx -y @talesofai/neta-skills@latest make_image --prompt "@角色名,/风格元素,参考图-素材uuid,描述词,描述词" --aspect "3:4"
|
|
24
24
|
```
|
|
25
|
+
(`参考图-` 与 `ref_img-` 前缀均可,后接图片素材的 UUID。)
|
|
25
26
|
📖 [详细指南](./references/image-generation.md) - 提示词结构、宽高比选择、用例
|
|
26
27
|
|
|
27
28
|
**生成视频**
|
|
@@ -47,6 +48,16 @@ npx -y @talesofai/neta-skills@latest make_song --prompt "风格描述" --lyrics
|
|
|
47
48
|
npx -y @talesofai/neta-skills@latest remove_background --input_image "image_artifact_uuid"
|
|
48
49
|
```
|
|
49
50
|
|
|
51
|
+
**上传本地图片或视频**
|
|
52
|
+
|
|
53
|
+
将磁盘上的文件登记为 Neta 素材(含上传与审核等待)。根据输出中的 **`uuid`** / **`url`**,再用于 `make_image`(`参考图-…` / `ref_img-…`)、`make_video`(`--image_source` 填 **URL**)、`remove_background`、或合集相关命令。
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "/path/to/file.png"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
📖 [媒体上传](./references/media-upload.md) — 支持格式、大小限制、与各下游命令的对应关系。
|
|
60
|
+
|
|
50
61
|
### 角色查询
|
|
51
62
|
|
|
52
63
|
**搜索角色**
|
|
@@ -83,5 +94,6 @@ npx -y @talesofai/neta-skills@latest read_collection --uuid "作品-uuid"
|
|
|
83
94
|
| 🎬 视频生成 | [video-generation.md](./references/video-generation.md) |
|
|
84
95
|
| 🎵 歌曲创作 | [song-creation.md](./references/song-creation.md) |
|
|
85
96
|
| 🎞️ MV 制作 | [song-mv.md](./references/song-mv.md) |
|
|
97
|
+
| 📤 本地上传 | [media-upload.md](./references/media-upload.md) |
|
|
86
98
|
| 👤 角色查询 | [character-search.md](./references/character-search.md) |
|
|
87
99
|
| 🖊️ 内容创作思路 | [collection-remix.md](./references/collection-remix.md) |
|
|
@@ -31,10 +31,14 @@ npx -y @talesofai/neta-skills@latest read_collection --uuid "作品-uuid"
|
|
|
31
31
|
|
|
32
32
|
## 开始创作
|
|
33
33
|
|
|
34
|
-
适用 `make_image` `make_video` `make_song`
|
|
34
|
+
适用 `make_image` `make_video` `make_song` 命令。
|
|
35
|
+
|
|
36
|
+
若用户提供的**图片或视频在本地**、不在合集返回的素材列表中,请先 **`upload`**,再在 `make_image` 中使用 **`参考图-<uuid>`** / **`ref_img-<uuid>`**,或在 `make_video` 中使用素材的 **`url`**。详见 [媒体上传](./media-upload.md)。
|
|
35
37
|
|
|
36
38
|
📖 - [生成图片](./image-generation.md)
|
|
37
39
|
|
|
38
40
|
📖 - [生成视频](./video-generation.md)
|
|
39
41
|
|
|
40
42
|
📖 - [生成歌曲](./song-creation.md)
|
|
43
|
+
|
|
44
|
+
📖 - [媒体上传](./media-upload.md)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
- 角色:通过"@角色名"格式使用角色,如"@角色名"。角色名必须是完全一致的字符串,不得修改,不得加空格,不得简体繁体转换。这个引用会包含角色的完整形象信息。
|
|
12
12
|
- 画面元素:通过"/元素名称"格式使用工具自带的画面元素,如"/漫画屋"。
|
|
13
|
-
- 参考图:
|
|
13
|
+
- 参考图: 使用 `8_image_edit` 时,用 **`参考图-<uuid>`** 引用已有**图片素材**,如 `参考图-1234567890`;亦可使用 **`ref_img-<uuid>`**(与英文 CLI 说明一致),解析效果相同。最多 14 张
|
|
14
14
|
- 中文自然语言词组:由短语组成的描述画面的文本,如果没有引用角色,则需要在自然语言词组中描述角色形象.
|
|
15
15
|
|
|
16
16
|
**推荐格式:**
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
- 画面元素必须以 "/名称" 形式出现,如 "/漫画屋"
|
|
24
24
|
- 对于 8_image_edit 模型,要多提供上下文和意图。要描述场景,而不仅仅是列出关键字。该模型的核心优势在于其深厚的语言理解能力。与一连串不相关的字词相比,叙述性描述段落几乎总是能生成更好、更连贯的图片
|
|
25
25
|
- 可以通过 search_character_or_elementum 搜索来获取可以使用的角色或元素,使用前通过 request_character_or_elementum 验证角色或者元素可用
|
|
26
|
-
-
|
|
26
|
+
- 参考图须为 **`参考图-<uuid>`** 或 **`ref_img-<uuid>`**(`<uuid>` 为图片素材 ID)。来源包括:**`upload`(本地文件)**、`read_collection` 中的图片、或其它已生成的图片素材
|
|
27
27
|
- 引用角色或者元素的时候,前后要添加空格或逗号分隔,如:"@奈塔#996, /漫画风格, 在校园里散步"
|
|
28
28
|
- 对于修改图片等跟原图参考相关的生成,请一定使用携带参考图并使用 8_image_edit 模型
|
|
29
|
-
- 示例(引用角色和元素):@奈塔#996, /漫画风格, 参考图-
|
|
29
|
+
- 示例(引用角色和元素):@奈塔#996, /漫画风格, 参考图-uuid, 参考图-uuid, 词组1, 词组2…
|
|
30
30
|
- **存在具体的角色时,通过@角色名来使用角色,而不是重新描述角色的外貌**
|
|
31
31
|
---
|
|
32
32
|
|
|
@@ -89,6 +89,12 @@ npx -y @talesofai/neta-skills@latest make_image \
|
|
|
89
89
|
|
|
90
90
|
---
|
|
91
91
|
|
|
92
|
+
## 本地文件作为参考图
|
|
93
|
+
|
|
94
|
+
若图片**只存在于本机**,请先执行 **`upload`**,再在提示词中使用 **`参考图-<uuid>`** 或 **`ref_img-<uuid>`**(`<uuid>` 取自上传命令返回的 JSON)。支持格式、大小及与 `make_video` / `remove_background` 的衔接见 [媒体上传](./media-upload.md)。
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
92
98
|
## 常见用例
|
|
93
99
|
|
|
94
100
|
### 角色立绘
|
|
@@ -163,3 +169,4 @@ npx -y @talesofai/neta-skills@latest remove_background --input_image "image_arti
|
|
|
163
169
|
|
|
164
170
|
- [角色查询](./character-search.md) - 获取角色标准信息
|
|
165
171
|
- [视频生成](./video-generation.md) - 将图片转换为动态视频
|
|
172
|
+
- [媒体上传](./media-upload.md) - 本地文件 → 素材,供参考图 / 视频首帧 / 抠图使用
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# 上传用户媒体(本地文件)
|
|
2
|
+
|
|
3
|
+
当用户有**磁盘上的图片或视频**,需要先变成 Neta 平台上的**素材(artifact)** 时,使用 **`upload`** 命令。CLI 会读取文件、通过 STS 上传到对象存储、登记为图片或视频素材,并轮询直到状态离开 `PENDING` / `MODERATION`。
|
|
4
|
+
|
|
5
|
+
**命令**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "/绝对路径或相对路径/文件.png"
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
**前置条件**
|
|
12
|
+
|
|
13
|
+
- 需设置 **`NETA_TOKEN`**(与其他需登录的命令相同)。未登录会报错。
|
|
14
|
+
- **`file_path`**:绝对路径,或相对于**执行命令时当前工作目录**的相对路径。
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## 支持的格式与大小限制
|
|
19
|
+
|
|
20
|
+
类型依据文件 **魔数** 检测(不仅看扩展名)。无法识别或不支持的类型会触发 `file_type_not_supported`。
|
|
21
|
+
|
|
22
|
+
| 类型 | 扩展名(示例) | 默认最大体积 |
|
|
23
|
+
|------|----------------|--------------|
|
|
24
|
+
| 图片 | `png`、`jpeg`、`webp`、`gif` | 10 MiB |
|
|
25
|
+
| 视频 | `avi`、`mov`、`flv`、`mkv`、`webm`、`mp4`、`mpeg`、`wmv`、`rm`、`vob`、`ts` | 100 MiB |
|
|
26
|
+
|
|
27
|
+
超出限制会触发 `file_size_too_large`。
|
|
28
|
+
|
|
29
|
+
**地域与存储桶**:实现会根据 API 基址是否以 `.cn` 结尾选择国内或海外 OSS,一般无需在技能侧单独配置。
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 命令输出
|
|
34
|
+
|
|
35
|
+
成功时返回 **素材详情**(与其他 artifact 接口结构一致),通常包括:
|
|
36
|
+
|
|
37
|
+
- **`uuid`**:素材 ID —— 凡是命令要求「素材 UUID」的场景都使用它(见下表)。
|
|
38
|
+
- **`url`**:可访问的图片/视频 URL(若已就绪)—— 用于要求 **图片 URL** 的参数(例如 `make_video --image_source`)。
|
|
39
|
+
- **`modality`**、**`status`**,以及可选的 `image_detail` / `video_detail`。
|
|
40
|
+
|
|
41
|
+
需等待命令执行结束;其中已包含上传与审核轮询(极端情况下仍可能超时,按错误处理或换更小文件重试)。
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 上传结果在创作技能中的用法
|
|
46
|
+
|
|
47
|
+
以下 **`neta-creative`** 流程会在素材已存在(通过 **`upload`**、此前 **`make_image`** 产出、或 **`read_collection`** 等)时消费用户侧内容。
|
|
48
|
+
|
|
49
|
+
| 目标 | 命令 | 如何使用 `upload` 的返回值 |
|
|
50
|
+
|------|------|---------------------------|
|
|
51
|
+
| 图生图 / 多参考图(`8_image_edit`) | `make_image` | 在提示词中写 **`参考图-<uuid>`** 或 **`ref_img-<uuid>`**(最多 14 张,两种前缀解析器均支持)。见 [图片生成](./image-generation.md)。 |
|
|
52
|
+
| 图生视频 | `make_video` | **`--image_source`** 填素材的 **`url`**(字符串 URL),不要只填裸 UUID。见 [视频生成](./video-generation.md)。 |
|
|
53
|
+
| 抠图 / 去背 | `remove_background`、`remove_background_nocrop` | **`--input_image`** 填素材 **`uuid`**。见 [图片生成](./image-generation.md) 中去背景一节。 |
|
|
54
|
+
| 从作品 Remix | `read_collection` | 合集载荷里可能带参考图;**本地文件**不会自动进入合集 —— 先 **`upload`**,再在 `make_image` 里用 **`参考图-<uuid>`** / **`ref_img-<uuid>`**,或把 **`url`** 用于 `make_video`。见 [内容创作思路](./collection-remix.md)。 |
|
|
55
|
+
| 发布或更新合集素材 | `publish_collection`、`edit_collection` | **`artifacts`**:逗号分隔的**图片 UUID**(1~12 个)。先上传图片,再传入对应 UUID。 |
|
|
56
|
+
|
|
57
|
+
**`make_song`** 不接受图片/视频文件;做 MV 仍按 [歌曲 MV](./song-mv.md) 组合歌曲与画面。若封面只在本地,先 **`upload`** 再接到 `make_image` / `make_video`。
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 推荐工作流
|
|
62
|
+
|
|
63
|
+
### 本地静图 → 视频
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "./静帧.png"
|
|
67
|
+
# 从输出的 JSON 中取 "url" 作为 image_source,或 "uuid" 用于后续步骤
|
|
68
|
+
|
|
69
|
+
npx -y @talesofai/neta-skills@latest make_video \
|
|
70
|
+
--image_source "<上传输出中的_URL>" \
|
|
71
|
+
--prompt "轻微呼吸感,发丝微动,光线柔和。" \
|
|
72
|
+
--model "model_s"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 本地图片 → 用 `8_image_edit` 改图
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "./参考.jpg"
|
|
79
|
+
|
|
80
|
+
npx -y @talesofai/neta-skills@latest make_image \
|
|
81
|
+
--prompt "参考图-<上传输出中的_UUID>,改为冬装外套,保持姿势与背景不变" \
|
|
82
|
+
--aspect "3:4" \
|
|
83
|
+
--model_series "8_image_edit"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
(将 `参考图-` 换成 `ref_img-` 效果相同。)
|
|
87
|
+
|
|
88
|
+
### 本地图片 → 抠图
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx -y @talesofai/neta-skills@latest upload --file_path "./角色.png"
|
|
92
|
+
|
|
93
|
+
npx -y @talesofai/neta-skills@latest remove_background --input_image "<上传输出中的_UUID>"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 相关文档
|
|
99
|
+
|
|
100
|
+
- [图片生成](./image-generation.md) — 参考图写法、模型、去背景。
|
|
101
|
+
- [视频生成](./video-generation.md) — `image_source` 与动作描述。
|
|
102
|
+
- [歌曲 MV](./song-mv.md) — 歌曲与画面组合。
|
|
103
|
+
- [内容创作思路](./collection-remix.md) — `read_collection` 与二创流程。
|
|
@@ -162,6 +162,10 @@ npx -y @talesofai/neta-skills@latest make_video --image_source "<URL3>" --prompt
|
|
|
162
162
|
- 单个视频片段适合 5-15 秒
|
|
163
163
|
- 完整 MV 需要多个片段组合
|
|
164
164
|
|
|
165
|
+
### 本地封面或主视觉
|
|
166
|
+
|
|
167
|
+
若用户已有封面图文件,先 **`upload`**,再将返回的 **`url`** 传给 `make_video --image_source`;若要在 `make_image` 里与其它元素合成,可使用 **`参考图-<uuid>`** 或 **`ref_img-<uuid>`**。详见 [媒体上传](./media-upload.md)。
|
|
168
|
+
|
|
165
169
|
---
|
|
166
170
|
|
|
167
171
|
## 常见问题
|
|
@@ -196,3 +200,4 @@ npx -y @talesofai/neta-skills@latest make_video --image_source "<URL3>" --prompt
|
|
|
196
200
|
|
|
197
201
|
- [歌曲生成](./song-creation.md) - 生成歌曲和歌词
|
|
198
202
|
- [视频生成](./video-generation.md) - 图片转视频技巧
|
|
203
|
+
- [媒体上传](./media-upload.md) - 本地封面 / 素材接入流程
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
适用于 `make_video` 命令。
|
|
4
4
|
|
|
5
|
+
**用户上传的静图:** `make_video --image_source` 需要 **图片 URL 字符串**。在 **`upload`** 完成后,应使用输出 JSON 里素材的 **`url`** 字段(不要只传裸 UUID)。详见 [媒体上传](./media-upload.md)。
|
|
6
|
+
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
## 提示词原则
|
|
@@ -218,4 +220,5 @@ npx -y @talesofai/neta-skills@latest make_video \
|
|
|
218
220
|
## 相关文档
|
|
219
221
|
|
|
220
222
|
- [图片生成](./image-generation.md) - 生成用于视频转换的图片
|
|
223
|
+
- [媒体上传](./media-upload.md) - 本地静图作为 `image_source`
|
|
221
224
|
- [歌曲 MV](./song-mv.md) - 结合歌曲和视频制作 MV
|