MCPInstall

see-through-anime-layer-decomposition

Expertise in See-through, a framework for single-image layer decomposition of anime characters into manipulatable 2.5D PSD files using diffusion models.

Installs
761
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/reason-machines/trending-skills --skill see-through-anime-layer-decomposition
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads see-through-anime-layer-decomposition automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

See-through: Anime Character Layer Decomposition

Skill by ara.so — Daily 2026 Skills collection.

See-through is a research framework (SIGGRAPH 2026, conditionally accepted) that decomposes a single anime illustration into up to 23 fully inpainted, semantically distinct layers with inferred drawing orders — exporting a layered PSD file suitable for 2.5D animation workflows.

What It Does

  • Decomposes a single anime image into semantic layers (hair, face, eyes, clothing, accessories, etc.)
  • Inpaints occluded regions so each layer is complete
  • Infers pseudo-depth ordering using a fine-tuned Marigold model
  • Exports layered .psd files with depth maps and segmentation masks
  • Supports depth-based and left-right stratification for further refinement

Installation

# 1. Create and activate environment
conda create -n see_through python=3.12 -y
conda activate see_through

# 2. Install PyTorch with CUDA 12.8
pip install torch==2.8.0+cu128 torchvision==0.23.0+cu128 torchaudio==2.8.0+cu128 \
  --index-url https://download.pytorch.org/whl/cu128

# 3. Install core dependencies
pip install -r requirements.txt

# 4. Create assets symlink
ln -sf common/assets assets

Optional Annotator Tiers

Install only what you need:

# Body parsing (detectron2 — for body attribute tagging)
pip install --no-build-isolation -r requirements-inference-annotators.txt

# SAM2 (language-guided segmentation)
pip install --no-build-isolation -r requirements-inference-sam2.txt

# Instance segmentation (mmcv/mmdet — recommended for UI)
pip install -r requirements-inference-mmdet.txt

Always run all scripts from the repository root as the working directory.

Models

Models are hosted on HuggingFace and downloaded automatically on first use:

ModelHuggingFace IDPurpose
LayerDiff 3Dlayerdifforg/seethroughv0.0.2_layerdiff3dSDXL-based transparent layer generation
Marigold Depth24yearsold/seethroughv0.0.1_marigoldAnime pseudo-depth estimation
SAM Body Parsing24yearsold/l2d_sam_iter219-part semantic body segmentation

Key CLI Commands

Main Pipeline: Layer Decomposition to PSD

# Single image → layered PSD
python inference/scripts/inference_psd.py \
  --srcp assets/test_image.png \
  --save_to_psd

# Entire directory of images
python inference/scripts/inference_psd.py \
  --srcp path/to/image_folder/ \
  --save_to_psd

Output is saved to workspace/layerdiff_output/ by default. Each run produces:

  • A layered .psd file with semantically separated layers
  • Intermediate depth maps
  • Segmentation masks

Heuristic Post-Processing

After the main pipeline, further split layers using heuristic_partseg.py:

# Depth-based stratification (e.g., separate near/far handwear)
python inference/scripts/heuristic_partseg.py seg_wdepth \
  --srcp workspace/test_samples_output/PV_0047_A0020.psd \
  --target_tags handwear

# Left-right stratification
python inference/scripts/heuristic_partseg.py seg_wlr \
  --srcp workspace/test_samples_output/PV_0047_A0020_wdepth.psd \
  --target_tags handwear-1

Synthetic Training Data Generation

python inference/scripts/syn_data.py

Python API Usage

Running the Full Pipeline Programmatically

import subprocess
import os

def decompose_anime_image(image_path: str, output_dir: str = "workspace/layerdiff_output") -> str:
    """
    Run See-through layer decomposition on a single anime image.
    Returns path to the output PSD file.
    """
    result = subprocess.run(
        [
            "python", "inference/scripts/inference_psd.py",
            "--srcp", image_path,
            "--save_to_psd",
        ],
        capture_output=True,
        text=True,
        cwd=os.getcwd()  # Must run from repo root
    )
    if result.returncode != 0:
        raise RuntimeError(f"Decomposition failed:\n{result.stderr}")
    
    # Derive expected output filename
    base_name = os.path.splitext(os.path.basename(image_path))[0]
    psd_path = os.path.join(output_dir, f"{base_name}.psd")
    return psd_path


# Example usage
psd_output = decompose_anime_image("assets/test_image.png")
print(f"PSD saved to: {psd_output}")

Batch Processing a Directory

import subprocess
from pathlib import Path

def batch_decompose(input_dir: str, output_dir: str = "workspace/layerdiff_output"):
    """Process all images in a directory."""
    result = subprocess.run(
        [
            "python", "inference/scripts/inference_psd.py",
            "--srcp", input_dir,
            "--save_to_psd",
        ],
        capture_output=True,
        text=True,
    )
    if result.returncode != 0:
        raise RuntimeError(f"Batch processing failed:\n{result.stderr}")
    
    output_psds = list(Path(output_dir).glob("*.psd"))
    print(f"Generated {len(output_psds)} PSD files in {output_dir}")
    return output_psds

# Example
psds = batch_decompose("path/to/my_anime_images/")

Post-Processing: Depth and LR Splits

import subprocess

def split_by_depth(psd_path: str, target_tags: list[str]) -> str:
    """Apply depth-based layer stratification to a PSD."""
    tags_str = " ".join(target_tags)
    result = subprocess.run(
        [
            "python", "inference/scripts/heuristic_partseg.py",
            "seg_wdepth",
            "--srcp", psd_path,
            "--target_tags", *target_tags,
        ],
        capture_output=True, text=True,
    )
    if result.returncode != 0:
        raise RuntimeError(result.stderr)
    # Output naming convention: original name + _wdepth suffix
    base = psd_path.replace(".psd", "_wdepth.psd")
    return base


def split_by_lr(psd_path: str, target_tags: list[str]) -> str:
    """Apply left-right layer stratification to a PSD."""
    result = subprocess.run(
        [
            "python", "inference/scripts/heuristic_partseg.py",
            "seg_wlr",
            "--srcp", psd_path,
            "--target_tags", *target_tags,
        ],
        capture_output=True, text=True,
    )
    if result.returncode != 0:
        raise RuntimeError(result.stderr)
    return psd_path.replace(".psd", "_wlr.psd")


# Full post-processing pipeline example
psd = "workspace/test_samples_output/PV_0047_A0020.psd"
depth_psd = split_by_depth(psd, ["handwear"])
lr_psd = split_by_lr(depth_psd, ["handwear-1"])
print(f"Final PSD with depth+LR splits: {lr_psd}")

Loading and Inspecting PSD Output

from psd_tools import PSDImage  # pip install psd-tools

def inspect_psd_layers(psd_path: str):
    """List all layers in a See-through output PSD."""
    psd = PSDImage.open(psd_path)
    print(f"Canvas size: {psd.width}x{psd.height}")
    print(f"Total layers: {len(list(psd.descendants()))}")
    print("\nLayer structure:")
    for layer in psd:
        print(f"  [{layer.kind}] '{layer.name}' — "
              f"bbox: {layer.bbox}, visible: {layer.is_visible()}")
    return psd

psd = inspect_psd_layers("workspace/layerdiff_output/my_character.psd")

Interactive Body Part Segmentation (Notebook)

Open and run the provided demo notebook:

jupyter notebook inference/demo/bodypartseg_sam.ipynb

This demonstrates interactive 19-part body segmentation with visualization using the SAM body parsing model.

Dataset Preparation for Training

See-through uses Live2D model files as training data. Setup requires a separate repo:

# 1. Clone the CubismPartExtr utility
git clone https://github.com/shitagaki-lab/CubismPartExtr
# Follow its README to download sample model files and prepare workspace/

# 2. Run data parsing scripts per README_datapipeline.md
# (scripts are in inference/scripts/ — check docstrings for details)

Launching the UI

# Requires workspace/datasets/ at repo root (contains sample data)
# Recommended: install mmdet tier first
pip install -r requirements-inference-mmdet.txt

# Then follow ui/README.md for launch instructions
cd ui
# See ui/README.md for the specific launch command

Directory Structure

see-through/
├── inference/
│   ├── scripts/
│   │   ├── inference_psd.py        # Main pipeline
│   │   ├── heuristic_partseg.py    # Depth/LR post-processing
│   │   └── syn_data.py             # Synthetic data generation
│   └── demo/
│       └── bodypartseg_sam.ipynb   # Interactive segmentation demo
├── common/
│   ├── assets/                     # Test images, etc.
│   └── live2d/
│       └── scrap_model.py          # Full body tag definitions
├── ui/                             # User interface
├── workspace/                      # Runtime outputs (auto-created)
│   ├── layerdiff_output/           # Default PSD output location
│   ├── datasets/                   # Required for UI
│   └── test_samples_output/        # Sample outputs
├── requirements.txt
├── requirements-inference-annotators.txt
├── requirements-inference-sam2.txt
├── requirements-inference-mmdet.txt
└── README_datapipeline.md

Common Patterns

Pattern: End-to-End Single Image Workflow

# Step 1: Decompose
python inference/scripts/inference_psd.py \
  --srcp assets/test_image.png \
  --save_to_psd

# Step 2: Depth-split a specific part tag
python inference/scripts/heuristic_partseg.py seg_wdepth \
  --srcp workspace/layerdiff_output/test_image.psd \
  --target_tags arm sleeve

# Step 3: Left-right split
python inference/scripts/heuristic_partseg.py seg_wlr \
  --srcp workspace/layerdiff_output/test_image_wdepth.psd \
  --target_tags arm-1 sleeve-1

Pattern: Check Available Body Tags

# Body tag definitions are in common/live2d/scrap_model.py
import importlib.util, sys
spec = importlib.util.spec_from_file_location(
    "scrap_model", "common/live2d/scrap_model.py"
)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
# Inspect the module for tag constants/enums
print(dir(mod))

ComfyUI Integration

A community-maintained ComfyUI node is available:

https://github.com/jtydhr88/ComfyUI-See-through

Install via ComfyUI Manager or clone into ComfyUI/custom_nodes/.

Troubleshooting

ProblemSolution
ModuleNotFoundError for detectron2/mmcvInstall the appropriate optional tier: pip install --no-build-isolation -r requirements-inference-annotators.txt
Scripts fail with path errorsAlways run from the repository root, not from within subdirectories
UI fails to launchInstall mmdet tier: pip install -r requirements-inference-mmdet.txt; ensure workspace/datasets/ exists
CUDA out of memoryUse a GPU with ≥16GB VRAM; SDXL-based LayerDiff 3D is memory-intensive
Assets not foundRe-run ln -sf common/assets assets from repo root
SAM2 install failsUse --no-build-isolation flag as shown in the install commands
Output PSD empty or malformedCheck workspace/layerdiff_output/ for intermediate depth/mask files to diagnose which stage failed

Citation

@article{lin2026seethrough,
  title={See-through: Single-image Layer Decomposition for Anime Characters},
  author={Lin, Jian and Li, Chengze and Qin, Haoyun and Chan, Kwun Wang and
          Jin, Yanghua and Liu, Hanyuan and Choy, Stephen Chun Wang and Liu, Xueting},
  journal={arXiv preprint arXiv:2602.03749},
  year={2026}
}

FAQ

What does the see-through-anime-layer-decomposition skill do?

Expertise in See-through, a framework for single-image layer decomposition of anime characters into manipulatable 2.5D PSD files using diffusion models.

How do I install see-through-anime-layer-decomposition?

Run npx skills add https://github.com/reason-machines/trending-skills --skill see-through-anime-layer-decomposition in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/see-through-anime-layer-decomposition/ (personal) or .claude/skills/see-through-anime-layer-decomposition/ (project).

Which AI agents can use see-through-anime-layer-decomposition?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is see-through-anime-layer-decomposition safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains see-through-anime-layer-decomposition?

It is published by reason-machines in reason-machines/trending-skills. It has 761 recorded installs.

More from reason-machines/trending-skills

View all →

openclaw-control-center

reason-machines/trending-skills

Local-first, security-first control center for OpenClaw agents — visibility dashboard with readonly defaults, token attribution, collaboration tracing, and safe write operations.

Data & Databases4.4K installs

inkos-multi-agent-novel-writing

reason-machines/trending-skills

Multi-agent CLI system for autonomous novel writing, auditing, and revision with human review gates

Docs & Writing2.8K installs

claude-hud-statusline

reason-machines/trending-skills

A Claude Code plugin that displays a real-time HUD showing context usage, active tools, running agents, and todo progress in your terminal statusline.

understand-anything-knowledge-graph

reason-machines/trending-skills

Turn any codebase into an interactive knowledge graph using Claude Code skills — explore, search, and ask questions about any project visually.

agency-agents-ai-specialists

reason-machines/trending-skills

A collection of specialized AI agent personalities for Claude Code, Cursor, Aider, Windsurf, and other AI coding tools — covering engineering, design, marketing, sales, and more.

AI & Agents2.1K installs

agent-browser-automation

reason-machines/trending-skills

Headless browser automation CLI for AI agents using native Rust binary with Chrome DevTools Protocol

Popular media & creative skills

View category →

hyperframes

heygen-com/hyperframes

Read first to make, edit, animate or render any video with HyperFrames (HTML rendered to video), including launch films, explainers, music videos, charts, maps, vertical clips, title cards, captions and overlays. Holds the render contract, the work loop and what each kind of video needs.

Media & Creative1.2M installs

media-use

heygen-com/hyperframes

Get or make any media for a HyperFrames video - music, sound effects, images, icons, logos, voiceover, avatar and generated video, transcripts, cutouts, colour grades and looks - with HeyGen or free local tools, and mix placed audio. Also for footage that looks dark, flat or dull, or should be stylized or hidden.

Media & Creative1.1M installs

hyperframes-registry

heygen-com/hyperframes

About 450 ready-made HyperFrames blocks and components installed as editable source - transitions, overlays, titles, kinetic type, captions, charts, map overlays, 3D, camera moves. Use it before hand-building any named visual (CRT scanlines, glitch, film grain, a chart); also for hyperframes add and catalog.

Media & Creative1M installs

hyperframes-creative

heygen-com/hyperframes

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use hyperframes-animation.

Media & Creative916.5K installs

ai-video-generation

101-skills/superpowers

Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, HappyHorse 1.0, Wan 2.5, Grok Imagine Video, OmniHuman, Fabric, HunyuanVideo. Capabilities: text-to-video, image-to-video, reference-to-video, video editing, lipsync, avatar animation, video upscaling, foley sound. Use for: social media videos, marketing content, explainer videos, product demos, AI avatars. Triggers: video generation, ai video, text to video, image to video, veo, animate image, video from image, ai animation, video generator, generate video, t2v, i2v, ai video maker, create video with ai, runway alternative, pika alternative, sora alternative, kling alternative, seedance, happyhorse

Media & Creative881.5K installs

ai-image-generation

101-skills/superpowers

Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.2 Klein LoRA, Gemini 3 Pro Image, Grok Imagine, Seedream 4.5, Reve, ImagineArt. Capabilities: text-to-image, image-to-image, inpainting, LoRA, image editing, upscaling, text rendering. Use for: AI art, product mockups, concept art, social media graphics, marketing visuals, illustrations. Triggers: flux, image generation, ai image, text to image, stable diffusion, generate image, ai art, midjourney alternative, dall-e alternative, text2img, t2i, image generator, ai picture, create image with ai, generative ai, ai illustration, grok image, gemini image, gpt image, openai image, chatgpt image

Media & Creative880.3K installs