jimeng-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese即梦 Skill
Jimeng (Dreamina) Skill
使用即梦 CLI 生成图片或视频
【重要并发限制】:即梦最多只能并行三个排队或生成中的任务!
Generate images or videos using Jimeng CLI
【Important Concurrency Limit】: Jimeng can run a maximum of 3 concurrent queuing or generating tasks!
默认值偏好顺序
Default Preference Order
始终用户要求优先,用户没要求时使用以下默认偏好顺序
User requirements always take precedence. When there are no specific requirements from the user, follow the default preference order below.
生图
Image Generation
- 模型偏好顺序(model_version):4.6 > 4.5 > 5.0 > 4.0
- 分辨率(resolution_type):2k
- Model preference order (model_version): 4.6 > 4.5 > 5.0 > 4.0
- Resolution (resolution_type): 2k
生视频
Video Generation
- 模型偏好顺序(model_version):seedance2.0 > seedance2.0fast
- 分辨率(video_resolution):720p
- Model preference order (model_version): seedance2.0 > seedance2.0fast
- Resolution (video_resolution): 720p
通用(生图+生视频)
General (Image + Video Generation)
- 比例(ratio)偏好顺序:16:9 > 9:16 > 1:1
- Aspect ratio (ratio) preference order: 16:9 > 9:16 > 1:1
初始化
Initialization
1. 先检查状态和积分
1. Check status and credits first
bash
dreamina user_credit如果命令未找到,先安装:
bash
curl -fsSL https://jimeng.jianying.com/cli | bash如果未登录,需要执行 登录,这个命令会拉起本地浏览器获取登录凭证。
dreamina loginbash
dreamina user_creditIf the command is not found, install it first:
bash
curl -fsSL https://jimeng.jianying.com/cli | bashIf you are not logged in, run to sign in. This command will launch your local browser to obtain login credentials.
dreamina login2. 查看所有功能
2. View all features
bash
dreamina --helpbash
dreamina --help从文本提示词文件生成
Generate from text prompt file
所有生图和生视频命令都支持从本地文本文件读取提示词:
bash
dreamina text2image --prompt "$(cat prompt.txt)" --ratio 16:9
dreamina text2video --prompt "$(cat prompt.txt)"
dreamina multimodal2video --prompt "$(cat prompt.txt)"All image and video generation commands support reading prompts from local text files:
bash
dreamina text2image --prompt "$(cat prompt.txt)" --ratio 16:9
dreamina text2video --prompt "$(cat prompt.txt)"
dreamina multimodal2video --prompt "$(cat prompt.txt)"生图
Image Generation
生图相对较快,直接生成:
bash
dreamina text2image --prompt "你的提示词" --ratio 16:9生成完成后直接下载到本地即可。
Image generation is relatively fast, you can generate directly:
bash
dreamina text2image --prompt "your prompt" --ratio 16:9After generation is complete, just download it to your local machine.
生视频(异步任务 + 轮询进度)
Video Generation (Asynchronous Task + Progress Polling)
视频生成通常需要较长时间,提交任务后会返回 ,需要通过定时轮询获取任务进度和排队情况。
submit_idVideo generation usually takes a long time. After submitting a task, a will be returned, and you need to get the task progress and queuing status through regular polling.
submit_id1. 提交生视频任务
1. Submit video generation task
查看具体子命令帮助:
bash
dreamina multimodal2video --helpView specific subcommand help:
bash
dreamina multimodal2video --help或
or
dreamina text2video --help
提交任务后会返回 `submit_id` 和当前排队位置,请记录 `submit_id` 用于后续轮询查询进度。dreamina text2video --help
After submitting the task, `submit_id` and current queuing position will be returned. Please save the `submit_id` for subsequent progress polling queries.2. 查询任务状态和轮询
2. Query task status and poll
使用以下命令定时查询任务状态:
bash
dreamina query_result --submit_id <submit_id>该命令会返回:
- 当前任务状态
- 排队位置/排队进度
- 如果已完成,会返回生成结果的下载 URL
Use the following command to query task status regularly:
bash
dreamina query_result --submit_id <submit_id>This command returns:
- Current task status
- Queuing position/queuing progress
- If completed, the download URL of the generated result
3. 定时轮询流程
3. Regular polling process
由于生成视频时间较长,需要每分钟轮询一次:
bash
undefinedSince video generation takes a long time, you need to poll once per minute:
bash
undefined每分钟查询一次状态
Query status every minute
while true; do
echo "=== $(date) ==="
dreamina query_result --submit_id <submit_id>
echo
sleep 60
done
任务完成后,从返回结果中提取下载 URL,使用 curl 下载并指定语义化的文件名:
```bash
curl -o "output.mp4" "<download_url>"while true; do
echo "=== $(date) ==="
dreamina query_result --submit_id <submit_id>
echo
sleep 60
done
After the task is completed, extract the download URL from the returned result, use curl to download and specify a semantic file name:
```bash
curl -o "output.mp4" "<download_url>"4. 排队进度与等待时间估算
4. Queuing progress and waiting time estimation
根据队列实际消耗速度估算:
- 记录每次轮询的时间差和排队位置变化
- 计算出每分钟队列平均前进多少位
- 用当前剩余排队位置除以前进速度,得到预估排队结束还需要多少分钟
- 将这两个信息告诉用户即可
Estimate based on the actual queue consumption speed:
- Record the time difference of each poll and the change in queuing position
- Calculate the average number of positions the queue advances per minute
- Divide the current remaining queuing positions by the advance speed to get the estimated number of minutes left until queuing ends
- Just inform the user of these two pieces of information
常用子命令(优先使用这几个)
Common Subcommands (Use these first)
- :根据提示词生成图片
dreamina text2image - :多参考图像生成图片
dreamina image2image - :文生视频
dreamina text2video - :全能参考生视频(支持图片参考 + 文字提示)
dreamina multimodal2video - :查询异步任务状态(生视频必须使用)
dreamina query_result - :列出已提交任务及其状态
dreamina list_task - :查看剩余积分
dreamina user_credit
- : Generate images from prompts
dreamina text2image - : Generate images with multiple reference images
dreamina image2image - : Text to video
dreamina text2video - : All-in-one reference video generation (supports image reference + text prompt)
dreamina multimodal2video - : Query asynchronous task status (required for video generation)
dreamina query_result - : List submitted tasks and their status
dreamina list_task - : Check remaining credits
dreamina user_credit
下载资源
Download Resources
- 使用 下载并指定语义化的文件名:
curl
例如
bash
curl -o "semantic-filename.mp4" "<download_url>"- Use to download and specify a semantic file name:
curl
Example
bash
curl -o "semantic-filename.mp4" "<download_url>"错误处理
Error Handling
如果遇到生成错误,你要把具体错误信息告诉用户,引导用户解决错误。
If you encounter a generation error, tell the user the specific error information and guide the user to resolve the error.