Communitygithub.com

FilippTrigub/abra

透過 Higgsfield 多模型雲端平台,從文字或圖片生成影片。支援 kling、seedance、dop 和 dop-preview 模型。內建小型預設層,可套用常見創意風格。自動偵測文字轉影片或圖片轉影片。無需 GPU。

abra 是什麼?

這是一個基於 Higgsfield 雲端平台的影片生成技能,允許開發者透過單一 API 和帳單帳戶,從文字或圖片生成高品質影片。它聚合了超過 6 個主流模型(包括 Kling、Seedance、Dop 等),讓使用者可以根據成本與品質的需求進行選擇。該技能可以自動偵測輸入內容是純文字提示還是圖片,從而切換至文字轉影片或圖片轉影片模式。此外,它還提供一組預設的「創意風格」預設集(如「電影感」、「社交鉤子」、「電商廣告」等),作為模型的輕量覆蓋層,可快速設定預設模型、寬高比、持續時間和提示文字前綴。該技能支援在 Agent 工作流程中與使用者互動:詢問模式、預設、模型、提示文字與進階設定,然後寫入 config.json,複製圖片(圖片轉影片時),執行生成腳本,最後報告結果。所有運算皆在雲端執行,本地無需 GPU,僅需 Higgsfield 帳號與 API 金鑰。該技能與 animate-image 技能互補:animate-image 適合單一圖片轉影片、速度更快且解析度可達 4K;而 video-generator 則支援文字轉影片、多模型選擇以及進階的「電影工作室物理控制」參數。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/FilippTrigub/abra/tree/HEAD/skills/video-generator

在你喜歡的 AI 中提問

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

說明文件

video-generator — 多模型雲端影片 (Higgsfield)

透過 Higgsfield 產生影片片段 — 該平台將 6 個以上的主流模型整合在單一 API 與帳單帳戶下。根據成本與品質的權衡選擇合適的模型;其餘介面完全相同。

技能目錄(此 SKILL.md 所在位置)在下方簡稱為 $SKILL_DIR。

雲端運算。 無需本機 GPU。需要 Higgsfield 帳號及從 cloud.higgsfield.ai 取得的 API 金鑰。


模式

模式觸發條件行為
text-to-videoinput/ 中無圖片僅根據提示詞產生影片
image-to-videoinput/ 中有圖片將每張圖片動畫化為片段
auto (預設)—自動選取上述模式

預設集

本技能將預設集作為同一影片引擎上的輕量覆蓋層。預設集可設定預設模型、寬高比、持續時間與提示詞前綴。明確設定的設定值仍優先。

預設集最佳用途預設模型預設比例
cinematic (預設)通用電影感影片kling16:9
social-hook吸引眼球短影片seedance9:16
motion-design-adSaaS/產品動態廣告kling16:9
ecommerce-ad產品促銷短片kling9:16
brand-story創辦人/品牌敘事kling16:9
product-360孤立產品展示kling1:1

工作流程規則:

  • 在編輯 config.json 之前先選擇一個預設集
  • 確認預設集符合期望的輸出風格
  • 若使用者未選擇,則保留預設預設集並記錄於設定檔中
  • 不要重複疊加相同風格;如果提示詞已符合預設集,則保持提示詞不變

模型

金鑰完整模型 ID最佳用途
kling (預設)kling-video/v2.1/pro/image-to-video逼真動態,經濟實惠
seedancebytedance/seedance/v1/pro/image-to-video原生音訊同步
dophiggsfield-ai/dop/standard電影工作室光學物理
dop-previewhiggsfield-ai/dop/preview電影工作室(預覽層級)

上述為官方文件中確認的模型 ID。其他模型(Sora、Veo、Wan 等)可在 cloud.higgsfield.ai/explore 找到。 若要新增一個,將其插入 generate.py 中的 MODEL_IDS,並新增 --model 別名。

僅成功產生的任務才會計費;失敗與 NSFW 請求會退款。


設定(僅首次執行)

cd "$SKILL_DIR" && uv sync

從 cloud.higgsfield.ai 取得憑證(API 金鑰 + API 密鑰), 然後使用下列其中一種方式匯出環境變數:

# 選項 A — 合併(建議)
export HF_KEY="your-api-key:your-api-secret"

# 選項 B — 分別設定變數
export HF_API_KEY="your-api-key"
export HF_API_SECRET="your-api-secret"

Agent 工作流程

1. 詢問使用者

在產生影片前,我需要了解以下資訊:

🎬 模式
   - text-to-video(僅提示詞)或 image-to-video(將圖片放入 input/)
   - 預設:自動偵測

🎛️ 預設集(預設:cinematic)
   - cinematic · social-hook · motion-design-ad · ecommerce-ad · brand-story · product-360
   - 在寫入 config.json 之前確認選擇
   - 若省略,保留預設預設集並記錄該選擇

🤖 模型(預設:kling)
   kling · seedance · dop · dop-preview
   建議:追求速度/成本選 kling,追求品質選 seedance

💬 提示詞(必填)
   描述動作或場景,例如:
   "慢速電影推近,溫暖黃金時刻光線,輕微攝影機漂移"

⚙️ 設定
   - duration     — 影片長度(秒)(預設:6,範圍:3–16)
   - aspect_ratio — 16:9 · 9:16 · 1:1(預設:16:9)
   - resolution   — 720p · 1080p(預設:1080p)

等待使用者回應後再繼續。

2. 編輯 config.json

根據使用者的選擇寫入或更新 $SKILL_DIR/config.json。 即使使用預設值,也請明確設定 preset。

3.(僅圖片轉影片)放置圖片

將來源圖片複製到 $SKILL_DIR/input/。支援格式:.jpg .jpeg .png .webp

4. 執行

cd "$SKILL_DIR" && uv run python scripts/generate.py --config config.json

5. 回報結果

告知使用者:

  • output/ 中的輸出檔案路徑
  • 使用的模型與約略的點數成本
  • 影片長度與解析度

設定參考

鍵值預設值說明
input_dir路徑./input來源圖片(僅圖片轉影片)
output_dir路徑./outputMP4 輸出目錄
modeauto · text-to-video · image-to-videoauto產生模式
presetcinematic · social-hook · motion-design-ad · ecommerce-ad · brand-story · product-360cinematic創意預設覆蓋層
modelkling · seedance · dop · dop-previewkling使用的模型
prompt字串(必填)動作或場景描述
duration整數 3–165影片長度(秒)
aspect_ratio16:9 · 9:16 · 1:116:9輸出寬高比
extra_params物件{}傳遞給模型的額外參數

常見指令範例

# 文字轉影片,使用預設模型 (kling)
cd "$SKILL_DIR" && uv run python scripts/generate.py \
  --prompt "晨霧山巒上的空拍鏡頭,日出時分" --duration 8

# 圖片轉影片,使用 Kling(先將圖片放入 input/)
cd "$SKILL_DIR" && uv run python scripts/generate.py \
  --prompt "慢速電影推近,黃金時刻光線" --model kling

# 更高品質:Seedance
cd "$SKILL_DIR" && uv run python scripts/generate.py \
  --prompt "黎明時分,霧氣城市上空拉遠空拍" --model seedance

# 直式影片,適用於 Reels/TikTok
cd "$SKILL_DIR" && uv run python scripts/generate.py \
  --prompt "談話頭像,自然散景背景" \
  --aspect-ratio 9:16 --model kling

# 快速草稿:較低解析度、較短片長
cd "$SKILL_DIR" && uv run python scripts/generate.py \
  --prompt "深色背景上的產品展示" \
  --resolution 720p --duration 4 --model dop-preview

輸出

每個任務會將一個 .mp4 寫入 output_dir:

  • 文字轉影片:output.mp4
  • 圖片轉影片:每個輸入圖片產生 <圖片檔名>.mp4

與 animate-image 比較

animate-imagevideo-generator
提供者fal.aiHiggsfield
模式僅圖片→影片文字→影片 + 圖片→影片
模型LTX-2.3 Fast(固定)Kling, Sora, Veo, Wan, Seedance, MiniMax
速度非常快依模型而定
最大解析度4K1080p
電影控制無透過 extra_params

需要快速、低成本、高解析度的圖片轉影片時,請使用 animate-image。 需要文字轉影片、模型選擇或 Higgsfield 的「電影工作室」物理控制時,請使用 video-generator。


API 注意事項

本技能直接與 Higgsfield REST API (cloud.higgsfield.ai) 通訊。 模型端點路徑定義在 generate.py 頂部的 MODEL_ENDPOINTS 中。 若 Higgsfield 更新了路由,可透過設定中的 "extra_params" 覆寫或更新常數即可,無需其他更動。

Individual skills in this repo

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

FilippTrigub/abra

>- Animate a still image into a short video clip using fal.ai's LTX-2.3 Fast image-to-video model in the cloud. No GPU required - runs entirely on fal.ai serverless infrastructure.

FilippTrigub/abra

>- Auto-describe and caption images using a local vision-language model. Writes a JSON sidecar per image containing a one-sentence description, a suggested Instagram caption with hashtags, and detected content tags.

FilippTrigub/abra

>- Animated caption pipeline. Use this skill when the user wants to burn word-by-word animated captions into videos — using Whisper for transcription and pycaps for rendering. Supports default minimalist style or a futuristic CSS theme with alternating gold/magenta glowing words.

FilippTrigub/abra

>- Cut videos into segments, rearrange them, and produce an output video with a specific cuts-per-second rate. Uses MoviePy for video manipulation. Prioritizes audio transcription for timestamped cutting, falls back to adaptive scene detection.

FilippTrigub/abra

>- Edit a region of a video using a text prompt via Wan2.1-VACE inpainting. Supports two modes: background (auto-segment via rembg) or region (rectangle defined by fractions). Requires a CUDA GPU with at least 8 GB free VRAM.

FilippTrigub/abra

>- Video enhancement pipeline. Use this skill when the user wants to sharpen, colour grade, warm, or normalise the audio of videos — including presets for natural, cinematic, or vivid looks.

FilippTrigub/abra

>- Remove the background from every frame of a video using AI (BiRefNet-general via rembg). Outputs transparent-background video or composites onto a solid colour or image. Requires a CUDA GPU with at least 3 GB free VRAM.

相關技能