Communitygithub.com

PrunaAI/pruna-skills

用於虛擬試穿——根據參考照片將衣物穿在人物身上,適用於時尚或電子商務場景。

pruna-skills 是什麼?

此技能專注於虛擬試穿,能根據使用者提供的人物與衣物參考照片,生成人物穿著指定衣物的合成圖像。它支援 Pruna 與 Replicate 的 API,並整合了提示詞多樣性、影像提示詞與 API 呼叫等附屬技能,確保生成過程的品質與效率。使用者需上傳人物與衣物圖片,可選用提示詞釐清模糊的參考衣物,並可調整 turbo 模式、參考姿勢等參數。此技能不適用於憑空創造新場景或衣物,僅用於忠實呈現使用者提供的參考素材。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/PrunaAI/pruna-skills/tree/HEAD/skills/image/p-image-try-on

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

先決條件

請先安裝並載入以下技能(若已透過 @pruna 加入上下文則可略過):

技能描述安裝指令
generation-diversity在撰寫任何生成提示詞時使用——儀式種子、明確結構、情境軸線與付費 API 呼叫前的品質門控。npx skills add PrunaAI/pruna-skills@generation-diversity -y
image-prompting在為任何生成模型製作靜態影像提示詞時使用——構圖、身分表、編輯、試穿與擬真人物。npx skills add PrunaAI/pruna-skills@image-prompting -y
pruna-api在任何 Pruna 或 Replicate HTTP 呼叫前使用——憑證、上傳/輪詢/下載、批次並行與代理安全。npx skills add PrunaAI/pruna-skills@pruna-api -y

或一次性安裝完整套件:npx skills add PrunaAI/pruna-skills@pruna -y

請遵循各技能的 生成前 / 構思章節——請勿在此重複指南內容。

代理人習慣

在第一個回覆中,用反引號標示 `p-image-try-on`,確認 PRUNA_API_KEY,然後詢問 person_image + garment_images。開啟接收流程 → 當使用者沉默時,使用 generation-diversity 澄清接收流程。當參考資料需要釐清時,使用提示詞構思(動態 + 忠實) 進行草稿——請勿貼上技能範例。將僅有背景/無衣物的任務導向 p-image-edit。

提示詞構思(動態 + 忠實)

人物身分與衣物來自 person_image + garment_images[]。可選的 prompt 僅用於釐清參考資料——不會憑空創造新的人物或服裝。

應做的事不應做的事
先鎖定 person_image 與每個 garment_images[] 的 URL;乾淨的平面圖則省略 prompt描述使用者未提供的新場景、模特兒或服裝
當參考資料模糊時:圖片1中的綠色T恤和圖片2中的褲子(image-prompting 試穿構思)僅有情調的提示詞(時尚編輯氛圍)或當參考資料不同時複製此技能的延伸範例
在草擬釐清措辭前進行儀式種子;當存在多種有效對應時變換措辭使用 prompt 進行背景替換——導向 p-image-edit
當參考資料模糊時,在 POST 前顯示 prompt(如有需要)靜默試穿,改變姿勢、臉部或超出需求的衣物

忠實度檢查(付費前): 輸出仍須是使用者的人物穿著使用者的衣物。如果 prompt 可能適用於不同的參考組合,請重新撰寫釐清措辭。

何時不使用

請使用其他技能:

技能描述安裝指令
p-image當有人明確需要最快、最便宜的圖片生成時使用——情緒板、批量面板或快速迭代——不需要受控的擬真或圖片內文字時。npx skills add PrunaAI/pruna-skills@p-image -y
p-image-edit當有人想編輯現有的照片時使用——更換服裝或背景、從參考圖片合成,或應用提示詞驅動的編輯。npx skills add PrunaAI/pruna-skills@p-image-edit -y

定價

每次生成(普通模式與渦輪模式相同):

  • $0.015 第一件衣物
  • $0.008 每件額外衣物

範例:3 件衣物 → $0.015 + 2 × $0.008 = $0.031。

請求格式

一個 person_image,一個 garment_images[] 條目對應每件衣物(最多 11 件),可選 reference_pose。模型會自動分類每件衣物——陣列順序無關緊要。混合類別應放在同一個呼叫中。

  • prompt ——僅在參考顯示多件衣物或穿在模特兒身上時使用;乾淨的平面圖不需要提示詞。
  • preserve_input_size: true(預設)——輸出尺寸跟隨人物圖片。

Runware 欄位對應:person → person_image,garment → garment_images[],pose → reference_pose,positivePrompt → prompt,settings.turbo → turbo。

HTTP (curl)

上傳圖片

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: ${PRUNA_API_KEY}" \
  -F "content=@/path/to/person.jpg"

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: ${PRUNA_API_KEY}" \
  -F "content=@/path/to/garment.png"

使用每個回應中的 urls.get 作為 input.person_image 與 input.garment_images[]。可選:reference_pose。

建立(非同步——建議使用)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-try-on' \
  -d '{
    "input": {
      "person_image": "https://api.pruna.ai/v1/files/PERSON_FILE_ID",
      "garment_images": ["https://api.pruna.ai/v1/files/GARMENT_FILE_ID"]
    }
  }'

輪詢與下載:遵循 pruna-api。

在撰寫提示詞前完成 generation-diversity 中的隨機種子儀式——請勿將儀式字串當作 API seed 傳遞。

建立(同步——僅用於快速測試)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-try-on' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "person_image": "https://api.pruna.ai/v1/files/PERSON_FILE_ID",
      "garment_images": ["https://api.pruna.ai/v1/files/GARMENT_FILE_ID"]
    }
  }'

擴展輸入(渦輪 + 姿勢 + 提示詞)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-image-try-on' \
  -d '{
    "input": {
      "person_image": "https://api.pruna.ai/v1/files/PERSON_FILE_ID",
      "garment_images": [
        "https://api.pruna.ai/v1/files/MULTI_GARMENT_SHOT_ID",
        "https://api.pruna.ai/v1/files/BOTTOM_ID"
      ],
      "reference_pose": "https://api.pruna.ai/v1/files/POSE_REF_ID",
      "prompt": "the green t-shirt from image 1 and the trousers from image 2",
      "turbo": true,
      "output_format": "jpg",
      "output_quality": 95,
      "preserve_input_size": true
    }
  }'

生成前

  1. 完成先決條件指南閱讀順序(generation-diversity → image-prompting 試穿構思)。
  2. 儀式種子 → 草擬可選的動態 + 忠實釐清 prompt(上方章節)→ 確認 person_image、garment_images(最終版本 ≤6 件;7–8 件通常可行;9–11 件可能遺漏最後幾項),以及可選的 turbo / reference_pose / prompt。
  3. Pruna 注意事項: 每個身體部位一件衣物(襪子 + 鞋子 → 通常鞋子勝出)。turbo(約 2.5–3.5 秒)預設關閉——不建議用於約 4 件以上的最終版本衣物。全身或七分身人物裁切效果最佳。請從 garment_images[] 中排除手套、連指手套、手持道具、口袋巾、吊帶、胸針。

必要輸入

  • person_image(字串 URL)
  • garment_images(字串 URL 陣列,最多 11 個)

常見可選欄位

  • seed、output_format(webp / jpg / png,預設 jpg)、output_quality(0–100,預設 95)
  • preserve_input_size(布林值,預設 true)
  • turbo(布林值,預設 false)
  • reference_pose(人物圖片 URL)
  • prompt(實驗性——釐清非平面圖 / 多衣物參考)

典型後續步驟

此技能後的常見後續操作:

技能描述安裝指令
p-image-upscale當有人想對現有圖片進行放大或銳化以用於印刷、大尺寸裁切或更高品質交付時使用。npx skills add PrunaAI/pruna-skills@p-image-upscale -y
p-video-2-pro當有人想從文字或起始/結束影格獲得電影級短片時使用——產品廣告、紀錄片鏡頭或帶有生成音訊的對話。不適用於 1080p、匯入音軌或僅有說話頭像的主持人。npx skills add PrunaAI/pruna-skills@p-video-2-pro -y
p-video-2當有人想從文字、圖片或匯入音訊獲得精緻的短片時使用——1080p B-roll、起始/結束影格動畫,或帶有混合音軌的動態鏡頭。不適用於電影級生成音訊剪輯或僅有說話頭像的主持人。npx skills add PrunaAI/pruna-skills@p-video-2 -y
p-video當有人想從文字或圖片獲得簡單的短片時使用——快速 B-roll、草稿或起始/結束影格動畫。不適用於需要電影級生成、最高品質、緊密唇形同步或 1080p 匯入音訊的簡報。npx skills add PrunaAI/pruna-skills@p-video -y
p-video-avatar當有人想要一個人物在鏡頭前朗讀腳本時使用——唇形同步的主持人、發言人或從肖像照片生成的敘述頭像。npx skills add PrunaAI/pruna-skills@p-video-avatar -y

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

PrunaAI/pruna-skills

Use when someone needs spoken narration or voiceover — explainer tracks, documentary lines, or voice to pair with generated video.

PrunaAI/pruna-skills

Use when someone wants an original AI song with vocals — sung lyrics, a style prompt track, or source audio for a music video.

PrunaAI/pruna-skills

Use when someone needs word-level timestamps from audio — lyric alignment, cut-safe line boundaries, or caption source timing before burn-in with video-editing.

PrunaAI/pruna-skills

Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.

PrunaAI/pruna-skills

Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits.

PrunaAI/pruna-skills

Use when crafting video or motion prompts for any generative model — dramaturgy, camera, physics-safe motion, frame anchors, and clip chaining.

PrunaAI/pruna-skills

Use when someone wants to edit an existing photo — change outfits or backgrounds, compose from reference images, or apply prompt-driven edits.

PrunaAI/pruna-skills

Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed.

PrunaAI/pruna-skills

Use when installing the full Pruna generative media suite — all guides, tools, and workflows in one package.

PrunaAI/pruna-skills

Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants to edit an existing video with a text instruction — recolor, restyle, remove or add objects, change environment or lighting, update on-screen text, or apply optional reference-guided product and accessory edits. Not for a new clip from scratch or ffmpeg assembly.

PrunaAI/pruna-skills

Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p.

相關技能