gif-sticker-maker
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGIF Sticker Maker
GIF贴纸生成器
Convert user photos into 4 animated GIF stickers (Funko Pop / Pop Mart style).
将用户照片转换为4个动画GIF贴纸(Funko Pop / Pop Mart风格)。
Style Spec
风格规范
- Funko Pop / Pop Mart blind box 3D figurine
- C4D / Octane rendering quality
- White background, soft studio lighting
- Caption: black text + white outline, bottom of image
- Funko Pop / Pop Mart盲盒3D手办风格
- C4D / Octane渲染画质
- 白色背景,柔和影棚灯光
- 字幕:黑色文字+白色描边,位于图像底部
Prerequisites
前置条件
Before starting any generation step, ensure:
- Python venv is activated with dependencies from requirements.txt installed
- is exported (e.g.
MINIMAX_API_KEY)export MINIMAX_API_KEY='your-key' - is available on PATH (for Step 3 GIF conversion)
ffmpeg
If any prerequisite is missing, set it up first. Do NOT proceed to generation without all three.
在开始任何生成步骤前,请确保:
- Python venv已激活,并安装了requirements.txt中的依赖
- ****已导出(例如:
MINIMAX_API_KEY)export MINIMAX_API_KEY='your-key' - ****已在PATH中可用(用于步骤3的GIF转换)
ffmpeg
如果缺少任何前置条件,请先设置好。未满足全部三个条件时,请勿开始生成。
Workflow
工作流程
Step 0: Collect Captions
步骤0:收集字幕
Ask user (in their language):
"Would you like to customize the captions for your stickers, or use the defaults?"
- Custom: Collect 4 short captions (1–3 words). Actions auto-match caption meaning.
- Default: Look up captions table by detected user language. Never mix languages.
用用户的语言询问:
"您想要自定义贴纸的字幕,还是使用默认字幕?"
- 自定义:收集4条短字幕(1-3个词)。动作会自动匹配字幕含义。
- 默认:根据检测到的用户语言,查阅captions表。绝不能混合语言。
Step 1: Generate 4 Static Sticker Images
步骤1:生成4张静态贴纸图像
Tool:
scripts/minimax_image.py- Analyze the user's photo — identify subject type (person / animal / object / logo).
- For each of the 4 stickers, build a prompt from image-prompt-template.txt by filling and
{action}.{caption} - If subject is a person: pass so the generated figurine preserves the person's actual facial likeness.
--subject-ref <user_photo_path> - Generate (all 4 are independent — run concurrently):
bash
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_hi.png --ratio 1:1 --subject-ref <photo>
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_laugh.png --ratio 1:1 --subject-ref <photo>
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_cry.png --ratio 1:1 --subject-ref <photo>
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_love.png --ratio 1:1 --subject-ref <photo>only works for person subjects (API limitation: type=character). For animals/objects/logos, omit the flag and rely on text description.--subject-ref
工具:
scripts/minimax_image.py- 分析用户照片——识别主体类型(人物/动物/物品/logo)。
- 为4张贴纸分别从image-prompt-template.txt构建提示词,填充和
{action}。{caption} - 如果主体是人物:传入,使生成的手办保留人物的真实面部特征。
--subject-ref <user_photo_path> - 生成图像(4个任务独立——并行运行):
bash
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_hi.png --ratio 1:1 --subject-ref <photo>
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_laugh.png --ratio 1:1 --subject-ref <photo>
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_cry.png --ratio 1:1 --subject-ref <photo>
python3 scripts/minimax_image.py "<prompt>" -o output/sticker_love.png --ratio 1:1 --subject-ref <photo>仅对人物主体有效(API限制:type=character)。 对于动物/物品/logo,请省略该参数,仅依靠文本描述。--subject-ref
Step 2: Animate Each Image → Video
步骤2:将每张图像动画化→视频
Tool: with flag (image-to-video mode)
scripts/minimax_video.py--imageFor each sticker image, build a prompt from video-prompt-template.txt, then:
bash
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_hi.png -o output/sticker_hi.mp4
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_laugh.png -o output/sticker_laugh.mp4
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_cry.png -o output/sticker_cry.mp4
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_love.png -o output/sticker_love.mp4All 4 calls are independent — run concurrently.
工具:带参数的(图像转视频模式)
--imagescripts/minimax_video.py为每张贴纸图像分别从video-prompt-template.txt构建提示词,然后:
bash
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_hi.png -o output/sticker_hi.mp4
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_laugh.png -o output/sticker_laugh.mp4
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_cry.png -o output/sticker_cry.mp4
python3 scripts/minimax_video.py "<prompt>" --image output/sticker_love.png -o output/sticker_love.mp44个调用独立——并行运行。
Step 3: Convert Videos → GIF
步骤3:将视频转换为GIF
Tool:
scripts/convert_mp4_to_gif.pybash
python3 scripts/convert_mp4_to_gif.py output/sticker_hi.mp4 output/sticker_laugh.mp4 output/sticker_cry.mp4 output/sticker_love.mp4Outputs GIF files alongside each MP4 (e.g. ).
sticker_hi.gif工具:
scripts/convert_mp4_to_gif.pybash
python3 scripts/convert_mp4_to_gif.py output/sticker_hi.mp4 output/sticker_laugh.mp4 output/sticker_cry.mp4 output/sticker_love.mp4输出的GIF文件将与对应MP4文件放在同一目录下(例如)。
sticker_hi.gifStep 4: Deliver
步骤4:交付成果
Output format (strict order):
- Brief status line (e.g. "4 stickers created:")
- block with all GIF files
<deliver_assets> - NO text after deliver_assets
xml
<deliver_assets>
<item><path>output/sticker_hi.gif</path></item>
<item><path>output/sticker_laugh.gif</path></item>
<item><path>output/sticker_cry.gif</path></item>
<item><path>output/sticker_love.gif</path></item>
</deliver_assets>输出格式(严格遵循顺序):
- 简短状态行(例如:"已创建4张贴纸:")
- 包含所有GIF文件的块
<deliver_assets> - 之后不能有任何文本
<deliver_assets>
xml
<deliver_assets>
<item><path>output/sticker_hi.gif</path></item>
<item><path>output/sticker_laugh.gif</path></item>
<item><path>output/sticker_cry.gif</path></item>
<item><path>output/sticker_love.gif</path></item>
</deliver_assets>Default Actions
默认动作
| # | Action | Filename ID | Animation |
|---|---|---|---|
| 1 | Happy waving | hi | Wave hand, slight head tilt |
| 2 | Laughing hard | laugh | Shake with laughter, eyes squint |
| 3 | Crying tears | cry | Tears stream, body trembles |
| 4 | Heart gesture | love | Heart hands, eyes sparkle |
See references/captions.md for multilingual caption defaults.
| 序号 | 动作 | 文件名ID | 动画效果 |
|---|---|---|---|
| 1 | 开心挥手 | hi | 挥手,轻微歪头 |
| 2 | 大笑 | laugh | 笑得发抖,眼睛眯起 |
| 3 | 流泪哭泣 | cry | 眼泪流下,身体颤抖 |
| 4 | 比心 | love | 比心手势,眼睛发亮 |
如需多语言默认字幕,请查阅references/captions.md。
Rules
规则
- Detect user's language, all outputs follow it
- Captions MUST come from captions.md matching user's language column — never mix languages
- All image prompts must be in English regardless of user language (only caption text is localized)
- must be LAST in response, no text after
<deliver_assets>
- 检测用户的语言,所有输出遵循该语言
- 字幕必须来自与用户语言匹配的captions.md列——绝不能混合语言
- 所有图像提示词必须为英文,无论用户使用何种语言(仅字幕文本本地化)
- 必须是响应的最后部分,之后不能有任何文本
<deliver_assets>