gif-sticker-maker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GIF 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:
  1. Python venv is activated with dependencies from requirements.txt installed
  2. MINIMAX_API_KEY
    is exported (e.g.
    export MINIMAX_API_KEY='your-key'
    )
  3. ffmpeg
    is available on PATH (for Step 3 GIF conversion)
If any prerequisite is missing, set it up first. Do NOT proceed to generation without all three.
在开始任何生成步骤前,请确保:
  1. Python venv已激活,并安装了requirements.txt中的依赖
  2. **
    MINIMAX_API_KEY
    **已导出(例如:
    export MINIMAX_API_KEY='your-key'
  3. **
    ffmpeg
    **已在PATH中可用(用于步骤3的GIF转换)
如果缺少任何前置条件,请先设置好。未满足全部三个条件时,请勿开始生成。

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
  1. Analyze the user's photo — identify subject type (person / animal / object / logo).
  2. For each of the 4 stickers, build a prompt from image-prompt-template.txt by filling
    {action}
    and
    {caption}
    .
  3. If subject is a person: pass
    --subject-ref <user_photo_path>
    so the generated figurine preserves the person's actual facial likeness.
  4. 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>
--subject-ref
only works for person subjects (API limitation: type=character). For animals/objects/logos, omit the flag and rely on text description.
工具
scripts/minimax_image.py
  1. 分析用户照片——识别主体类型(人物/动物/物品/logo)。
  2. 为4张贴纸分别从image-prompt-template.txt构建提示词,填充
    {action}
    {caption}
  3. 如果主体是人物:传入
    --subject-ref <user_photo_path>
    ,使生成的手办保留人物的真实面部特征。
  4. 生成图像(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>
--subject-ref
仅对人物主体有效(API限制:type=character)。 对于动物/物品/logo,请省略该参数,仅依靠文本描述。

Step 2: Animate Each Image → Video

步骤2:将每张图像动画化→视频

Tool:
scripts/minimax_video.py
with
--image
flag (image-to-video mode)
For 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.mp4
All 4 calls are independent — run concurrently.
工具:带
--image
参数的
scripts/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.mp4
4个调用独立——并行运行

Step 3: Convert Videos → GIF

步骤3:将视频转换为GIF

Tool:
scripts/convert_mp4_to_gif.py
bash
python3 scripts/convert_mp4_to_gif.py output/sticker_hi.mp4 output/sticker_laugh.mp4 output/sticker_cry.mp4 output/sticker_love.mp4
Outputs GIF files alongside each MP4 (e.g.
sticker_hi.gif
).
工具
scripts/convert_mp4_to_gif.py
bash
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.gif
)。

Step 4: Deliver

步骤4:交付成果

Output format (strict order):
  1. Brief status line (e.g. "4 stickers created:")
  2. <deliver_assets>
    block with all GIF files
  3. 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>
输出格式(严格遵循顺序):
  1. 简短状态行(例如:"已创建4张贴纸:")
  2. 包含所有GIF文件的
    <deliver_assets>
  3. <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

默认动作

#ActionFilename IDAnimation
1Happy wavinghiWave hand, slight head tilt
2Laughing hardlaughShake with laughter, eyes squint
3Crying tearscryTears stream, body trembles
4Heart gestureloveHeart 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)
  • <deliver_assets>
    must be LAST in response, no text after
  • 检测用户的语言,所有输出遵循该语言
  • 字幕必须来自与用户语言匹配的captions.md列——绝不能混合语言
  • 所有图像提示词必须为英文,无论用户使用何种语言(仅字幕文本本地化)
  • <deliver_assets>
    必须是响应的最后部分,之后不能有任何文本