Runware Image & Video generation技能使用说明
2026-04-01
新闻来源:网淘吧
围观:16
电脑广告
手机广告
Runware
通过Runware的统一API进行图像和视频生成。可访问FLUX、Stable Diffusion XL、Kling AI等模型。
设置
设置RUNWARE_API_KEY环境变量,或在脚本中传递--api-key参数。

获取API密钥:https://runware.ai
图像生成
文生图
python3 scripts/image.py gen "a cyberpunk city at sunset, neon lights, rain" --count 2 -o ./images
选项:
--model:模型ID(默认:runware:101@1/ FLUX.1 Dev)--width/--height:尺寸(默认:1024x1024)--steps:推理步数(默认:25)--cfg:CFG规模(默认:7.5)--count/-n图片数量--negative: 负面提示词--seed: 可复现种子--lora: LoRA模型ID--format: png/jpg/webp
图生图
转换现有图片:
python3 scripts/image.py img2img ./photo.jpg "watercolor painting style" --strength 0.7
--strength: 转换强度(0=保持原图,1=忽略原图)
高清修复
python3 scripts/image.py upscale ./small.png --factor 4 -o ./large.png
列出模型
python3 scripts/image.py models
视频生成
文生视频
python3 scripts/video.py gen "a cat playing with yarn, cute, high quality" --duration 5 -o ./cat.mp4
选项:
--model: 模型ID(默认:klingai:5@3/ Kling AI 1.6 Pro)--duration: 时长(秒)--width/--height分辨率(默认:1920x1080)--negative: 负面提示词--format: mp4/webm/mov--max-wait: 轮询超时时间(默认:600秒)
图像转视频
为图像添加动画或在帧之间进行插值:
# Single image (becomes first frame)
python3 scripts/video.py img2vid ./start.png --prompt "zoom out slowly" -o ./animated.mp4
# Two images (first and last frame)
python3 scripts/video.py img2vid ./start.png ./end.png --duration 5
列出视频模型
python3 scripts/video.py models
热门模型
图像
| 模型 | ID |
|---|---|
| FLUX.1 开发版 | runware:101@1 |
| FLUX.1 快速版 | runware:100@1 |
| FLUX.1 上下文版 | runware:106@1 |
| Stable Diffusion XL | civitai:101055@128080 |
| RealVisXL | civitai:139562@297320 |
视频
| 模型 | ID |
|---|---|
| Kling AI 1.6 Pro | klingai:5@3 |
| Kling AI 1.5 Pro | klingai:3@2 |
| Runway Gen-3 | runwayml:1@1 |
浏览全部:https://runware.ai/models
备注
- 视频生成是异步的;脚本会轮询直到完成
- 费用因模型而异 — 请查看https://runware.ai/pricing
- FLUX 模型在质量方面表现出色;Schnell 速度更快
- 为了获得最佳视频效果,请使用包含运动词汇的描述性提示词
文章底部电脑广告
手机广告位-内容正文底部


微信扫一扫,打赏作者吧~