Upscale Image by b-open-io/gemskills
npx skills add https://github.com/b-open-io/gemskills --skill 'Upscale Image'使用 Vertex AI 上的 Imagen 进行图像超分辨率处理。
此技能需要 Vertex AI 凭据(而非 GEMINI_API_KEY)。
echo "Project: ${GOOGLE_CLOUD_PROJECT:-NOT SET}"
gcloud auth application-default print-access-token &>/dev/null && echo "Auth: OK" || echo "Auth: NOT CONFIGURED"
如果凭据未配置,请引导用户完成以下步骤:
获取 Google Cloud 项目
启用 Vertex AI API
启用结算功能
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
安装 gcloud CLI(如未安装)
brew install google-cloud-sdk身份验证
gcloud auth application-default login
这将打开浏览器进行 Google 登录。
设置环境变量
echo 'export GOOGLE_CLOUD_PROJECT=your-project-id' >> ~/.zshenv
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts <input-image> [options]
--factor <x2|x4> - 超分辨率倍数(默认:x2)--format <png|jpeg|webp> - 输出格式--quality <n> - JPEG 质量(1-100)--output <path> - 输出路径--project <id> - Google Cloud 项目(覆盖环境变量)--location <region> - Vertex AI 区域(默认:us-central1)# 2倍超分辨率
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg
# 4倍超分辨率
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg --factor x4
# 超分辨率并保存为 PNG
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg --factor x4 --format png --output hires.png
# 显式指定项目
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg --project my-gcp-project --factor x4
请勿将生成的图像读回上下文。 脚本仅输出文件路径。请要求用户目视检查结果。超分辨率后的图像特别大(2倍/4倍分辨率),会迅速耗尽上下文窗口。
通过 Vertex AI upscaleImage API 使用 imagen-3.0-generate-002。
Imagen 超分辨率 API 仅通过 Vertex AI 提供,而非标准 Gemini API。这是 Google 的限制 - @google/genai SDK 中的 upscaleImage 方法仅适用于 Vertex AI 后端。
每周安装量
0
代码仓库
GitHub 星标数
2
首次出现
1970年1月1日
安全审计
Upscale images using Imagen on Vertex AI.
This skill requires Vertex AI credentials (not GEMINI_API_KEY).
echo "Project: ${GOOGLE_CLOUD_PROJECT:-NOT SET}"
gcloud auth application-default print-access-token &>/dev/null && echo "Auth: OK" || echo "Auth: NOT CONFIGURED"
If credentials are not configured, guide the user through these steps:
Get a Google Cloud Project
Enable Vertex AI API
Enable Billing
Install gcloud CLI (if not installed)
brew install google-cloud-sdkAuthenticate
gcloud auth application-default login
This opens a browser for Google sign-in.
Set Environment Variable
echo 'export GOOGLE_CLOUD_PROJECT=your-project-id' >> ~/.zshenv
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts <input-image> [options]
--factor <x2|x4> - Upscale factor (default: x2)--format <png|jpeg|webp> - Output format--quality <n> - JPEG quality (1-100)--output <path> - Output path--project <id> - Google Cloud project (overrides env var)--location <region> - Vertex AI location (default: us-central1)# 2x upscale
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg
# 4x upscale
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg --factor x4
# Upscale and save as PNG
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg --factor x4 --format png --output hires.png
# Specify project explicitly
bun run ${CLAUDE_PLUGIN_ROOT}/skills/upscale-image/scripts/upscale.ts photo.jpg --project my-gcp-project --factor x4
Do not read generated images back into context. The script outputs only the file path. Ask the user to visually inspect the result. Upscaled images are especially large (2x/4x resolution) and will quickly exhaust the context window.
Uses imagen-3.0-generate-002 via Vertex AI upscaleImage API.
The Imagen upscaling API is only available through Vertex AI, not the standard Gemini API. This is a Google limitation - the upscaleImage method in the @google/genai SDK only works with Vertex AI backend.
Weekly Installs
0
Repository
GitHub Stars
2
First Seen
Jan 1, 1970
Security Audits
Azure 配额管理指南:服务限制、容量验证与配额增加方法
75,600 周安装