SuperAPI AI 工具集

p-image

设计与创作

查看项目

更新于 11-14 16:19

技能介绍

用途

p-image 是一个基于 inference.sh CLI(belt)调用 Pruna P-Image 系列模型的图像生成与编辑技能。它把文生图和图像编辑封装为命令行应用调用,适合在终端或自动化流程中快速生成图片。

主要能力

提供四个模型:

  • P-Image(pruna/p-image):快速文生图,支持多种画幅比例。
  • P-Image-LoRA(pruna/p-image-lora):使用内置 LoRA 预设生成自定义风格图像。可用预设包括 photos-realism、pixel-art、japanese-modern-look、cinematic-movie-style、graffiti-splash、neon-punk、anime-2-5d、ethereal-portrait、retro-90s-style、ink-sketchbook、paper-cut。
  • P-Image-Edit(pruna/p-image-edit):基于提示词编辑图像,支持传入多张图片进行合成。
  • P-Image-Edit-LoRA(pruna/p-image-edit-lora):带风格的图像编辑。

支持画幅比例包括 1:1、16:9、9:16、4:3、3:4、3:2、2:3,也可通过 width/height 自定义。

使用方式

需先安装 belt CLI(npx skills add belt-sh/cli)并执行 belt login 登录。然后通过 belt app run 传入 JSON 参数调用,例如:

belt app run pruna/p-image --input '{"prompt": "a futuristic cityscape at sunset"}'

带画幅比例:

belt app run pruna/p-image --input '{"prompt": "landscape mountain scene", "aspect_ratio": "16:9"}'

使用 LoRA 预设:

belt app run pruna/p-image-lora --input '{"prompt": "portrait of a woman in golden hour light", "lora_preset": "photos-realism"}'

图像编辑:

belt app run pruna/p-image-edit --input '{"prompt": "change the background to a beach", "images": ["https://your-image.jpg"]}'

多图合成:

belt app run pruna/p-image-edit --input '{"prompt": "combine these images into a collage", "images": ["https://img1.jpg", "https://img2.jpg", "https://img3.jpg"]}'

适用场景

适合需要从命令行批量或脚本化生成图像的开发者与创作者,包括快速概念图、风格化人像、产品图、多图合成和按提示词改图等。

限制

必须依赖 inference.sh CLI(belt)并登录后才能调用;图像通过 URL 传入。资料未说明具体收费、生成速度、输出分辨率与模型效果,相关细节暂未提供,需参阅官方文档。