# Intro
This repo has three parts:
1) **prompt2gloss**: text prompt -> gloss sequence
2) **gloss2pose**: gloss -> pose video (skeleton)
3) **pose2video**: pose video -> rendered signer video (One-to-All 1.3B, with refine)
# Quickstart
## 0) Env (one-to-all)
```bash
cd /research/cbim/vast/sf895/code/SignerX-inference-webui/plugins/StableSigner
conda env create -f env/one-to-all.yml
conda activate one-to-all
```
## 1) prompt2gloss (optional)
```bash
python pipeline01_prompt2gloss.py --prompt "good morning afternoon"
```
This prints a gloss sequence you can pass to gloss2pose.
## 2) gloss2pose (unchanged)
```bash
python pipeline02_gloss2pose.py --gloss "good morning afternoon" --scale-y 1.4 --scale-x 1.3 --npz-interpolation 20 --width 512 --height 768 --fps 25 --hide-torso-lines true --ref-image-path ref_img_dict/01.jpeg
or
python gloss2pose.py --gloss "where is my cat" --scale-y 1.5 --scale-x 1.5 --npz-interpolation 20 --width 512 --height 512 --fps 25 --hide-torso-lines false --draw-style openpose
```
This creates a pose video in `generated_pose_video/`.
## 3) pose2video + refine (One-to-All, required)
`pipeline03_pose2video.sh` now runs **two stages**:
- **Stage1**: direct pose2video (inference_1.3b.py)
- **Stage2**: refine/replace (infer_refine.sh) using Stage1 output
```bash
./pipeline03_pose2video.sh
```
Defaults are inside the script. You can override by env vars:
```bash
POSE_VIDEO=generated_pose_video/HELLO_GOOD_MORNING_20251215_142658_openpose_style.mp4 \
REF_IMAGE=ref_img_dict/man.jpg \
GPU_ID=1 \
REF_CFG=2.5 \
POSE_CFG=1.5 \
./pipeline03_pose2video.sh
```
# Refine-only (manual)
If you already have a video (or frames dir), run refine directly:
```bash
cd One-to-All-Animation/video-generation
./infer_refine.sh --input /path/to/video_or_frames_dir --ref /path/to/ref.jpg --gpu 1
```
- If `--input` is a **frames directory**, it will auto-merge to a temp video (default fps=25).
- If `--input` is a **video file**, it uses the source FPS.
# Outputs
- Pose video: `generated_pose_video/*.mp4`
- Stage1 output: `generated_sign_video/YYYY-MM-DD_ref__pose_/...mp4`
- Refine output: `generated_sign_video_refine/...mp4`
# Notes
- The One-to-All pipeline uses the `one-to-all` conda env.
- If you change `REF_CFG/POSE_CFG`, keep the same values in both stages.