关于 image-upscaling
使用 each::sense 放大和增强图像的技能,支持从 2 倍到 16 倍放大。还可用于面部细节修复、降噪、旧照片修复,以及保留 AI 艺术作品细节。
主要功能
- 01支持 2 倍至 16 倍放大
- 02放大时增强面部细节
- 03减少噪点和压缩伪影
- 04修复旧照片
- 05保留 AI 艺术作品细节
适用场景
- 01放大网页图片以用于印刷
- 02改善低光照片的清晰度
- 03修复并放大家庭旧照片
- 04为电商优化产品图像
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ eachlabs/ skills --skill image-upscaling安装后在 Claude Code 中输入/image-upscaling确认已加载。
附带文件references/SSE-EVENTS.md
详细介绍
图像放大
使用 each::sense 放大并增强图像。此技能提供 AI 驱动的图像放大功能,分辨率可提升至 2 倍到 16 倍,并提供面部增强、降噪和细节保留等智能选项。
功能
- 2 倍放大:快速增强网页图像和社交媒体图片
- 4 倍放大:适用于印刷材料的高质量输出
- 8 倍/16 倍放大:适用于大幅面显示、广告牌和海报
- 面部增强:放大时智能还原面部细节
- 降噪:放大时清理颗粒感或经过压缩的图像
- 老照片修复:让复古和受损照片重现活力
- AI 艺术增强:保留并增强 AI 生成的艺术作品细节
- 产品图像增强:适用于电商的高分辨率产品图像
快速入门
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this image 4x for print quality"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/my-image.jpg"],
"mode": "max"
}'
放大倍数
| 倍数 | 输出尺寸(原始尺寸为 1024px) | 最佳用途 |
|---|---|---|
| 2 倍 | 2048px | 网页图像、社交媒体、缩略图 |
| 4 倍 | 4096px | 印刷材料、高分辨率显示屏 |
| 8 倍 | 8192px | 大幅面印刷品、海报 |
| 16 倍 | 16384px | 广告牌、展览显示屏 |
用例示例
1. 网页图像 2 倍放大
非常适合提升网站、社交媒体帖子和数字营销图像的质量。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this web image 2x. Optimize for fast loading while improving sharpness and clarity. The image will be used on a website hero section."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/website-hero.jpg"],
"mode": "eco"
}'
2. 印刷品 4 倍放大
适用于宣传册、传单、杂志及其他要求 300 DPI 的印刷材料的高质量放大。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this image 4x for print production. I need 300 DPI quality for a magazine spread. Preserve all fine details and ensure crisp edges."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/magazine-photo.jpg"],
"mode": "max"
}'
3. 大幅面 8 倍/16 倍放大
适用于广告牌、展会展示品和整面墙大小的印刷品的超高倍放大。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this image 8x for a large format banner print. The final output will be displayed on a 10 foot wide trade show backdrop. Maximize detail enhancement and ensure no artifacts."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/tradeshow-banner.jpg"],
"mode": "max"
}'
4. 放大时增强面部
在放大人像的同时,智能修复面部并增强眼睛、皮肤纹理和面部特征。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this portrait 4x with face enhancement enabled. Restore facial details, enhance eyes, improve skin texture while keeping it natural. This is a headshot photo."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/portrait-headshot.jpg"],
"mode": "max"
}'
5. 降噪并放大
在提高分辨率的同时,清理颗粒感明显、经过压缩或质量较低的图像。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this noisy low-light photo 4x. Apply aggressive noise reduction while preserving important details. The image was taken in low light conditions and has visible grain and compression artifacts."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/low-light-photo.jpg"],
"mode": "max"
}'
6. 老照片放大
修复并放大复古照片、老家庭照片和历史图像。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale and restore this old family photograph from the 1970s. The image is faded, slightly damaged, and low resolution. Enhance to 4x while restoring colors, fixing damage, and improving clarity. Preserve the vintage aesthetic."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/old-family-photo.jpg"],
"mode": "max"
}'
7. AI 艺术作品放大
增强 AI 生成的艺术作品,同时保留艺术风格并避免出现伪影。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this AI-generated artwork 4x for print. Preserve the artistic style and enhance fine details. This is digital art created by an AI image generator - avoid adding unwanted textures or changing the artistic style."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/ai-artwork.png"],
"mode": "max"
}'
8. 产品图像放大
针对电商优化产品摄影图像的放大效果并增强细节。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this product photo 4x for e-commerce use. Enhance product details, improve sharpness on edges and textures. The image is of a leather handbag and needs to show material texture clearly for zoom functionality."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/product-handbag.jpg"],
"mode": "max"
}'
9. 视频帧放大
增强从视频内容中提取的单个视频帧或缩略图。
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this video frame 4x. This is a still frame extracted from 1080p video footage. Enhance it to 4K quality while reducing compression artifacts and maintaining natural motion blur where present."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/video-frame.jpg"],
"mode": "max"
}'
10. 批量放大工作流
使用会话持久化功能,以一致的设置处理多张图像。
# First image in batch
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this product image 4x with face enhancement and noise reduction. This is the first of a series of product photos I need processed."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/product-001.jpg"],
"session_id": "batch-upscale-products",
"mode": "max"
}'
# Second image (same session maintains settings)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this next product image using the same settings as before."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/product-002.jpg"],
"session_id": "batch-upscale-products"
}'
# Third image
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Continue with the same upscaling settings for this product image."}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/product-003.jpg"],
"session_id": "batch-upscale-products"
}'
最佳实践
选择放大倍数
- 2 倍:足以满足大多数网页和社交媒体用例
- 4 倍:印刷质量的标准选择(相当于 300 DPI)
- 8 倍以上:仅适用于观看距离较远的大幅面场景
质量提示
- 源图像质量很重要:输入质量越高,放大后的输出效果越好
- 文件格式:尽可能使用 PNG 或高质量 JPEG(90% 以上)作为输入
- 面部增强:仅对包含人脸的图像启用
- 降噪:用于低光照或严重压缩的图像时,可大幅启用降噪
输出注意事项
- 文件大小:放大倍数越高,生成的文件就越大
- 处理时间:8 倍和 16 倍放大需要更长时间,请耐心等待
- 观看距离:大幅面印刷品通常会从远处观看,并非总是需要极致细节
图像放大的提示词技巧
请求放大时,请在提示词中包含以下详细信息:
- 放大倍数:指定 2 倍、4 倍、8 倍或 16 倍
- 用例:网页、印刷、大幅面显示
- 图像类型:照片、AI 艺术作品、产品图、人像
- 特殊要求:面部增强、降噪、伪影去除
- 输出用途:最终用途有助于优化处理效果
提示词结构示例
"Upscale this [image type] [scale factor] for [use case].
[Special requirements like face enhancement or noise reduction].
[Additional context about the source image quality or intended output]."
模式选择
处理前询问用户:
“您想要速度快、成本低,还是质量高?”
| 模式 | 最适合 | 速度 | 质量 |
|---|---|---|---|
max | 最终成品图、印刷材料、重要项目 | 较慢 | 最高 |
eco | 快速预览、批量测试、网页缩略图 | 较快 | 良好 |
多轮放大工作流
使用 session_id 迭代调整放大结果:
# Initial upscale
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Upscale this photo 4x for print"}],
"model": "eachsense/beta",
"stream": true,
"image_urls": ["https://example.com/photo.jpg"],
"session_id": "upscale-project-001"
}'
# Request adjustments
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "The result looks good but can you also apply face enhancement and reduce noise?"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "upscale-project-001"
}'
# Request different scale
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Actually I need 8x for a larger print. Can you upscale it further?"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "upscale-project-001"
}'
错误处理
| 错误 | 原因 | 解决方案 |
|---|---|---|
Failed to create prediction: HTTP 422 | 余额不足 | 在 eachlabs.ai 充值 |
| 图像过大 | 源图像超出最大尺寸 | 放大前调整源图像尺寸 |
| 超时 | 较大的缩放倍数需要更长时间 | 将客户端超时时间设为至少 10 分钟 |
| 不支持的格式 | 图像格式无效 | 使用 JPEG、PNG 或 WebP 输入 |
相关技能
each-sense- 核心 API 文档image-generation- 根据文本提示词生成图像image-editing- 编辑和修改现有图像old-photo-restoration- 专用于修复老照片
评论
支持 Markdown