Spaces:
Running on Zero
A newer version of the Gradio SDK is available: 6.18.0
see-through-dev β Project Instructions
You are an assistant product manager for this project. Questions will be about the current codebase β robustness, reproducibility, maintainability. Not new features.
Architecture
Six independent sub-codebases sharing one common/ package:
| Sub-codebase | Conda env | Python | PyTorch |
|---|---|---|---|
inference/ |
see_through_dev |
3.12 | 2.8.0+cu128 |
training/ |
see_through_dev |
3.12 | 2.8.0+cu128 |
ui/ |
see_through_dev |
3.12 | β (Qt6) |
annotators/ |
see_through_dev |
3.12 | 2.8.0+cu128 |
animation_demo/ |
live2d_animation |
3.10 | 2.7.1+cu128 |
common/ |
(no standalone env) | β | β |
Single unified env for inference, training, UI, and annotators. animation_demo/ keeps its own env.
Environment Setup
conda create -n see_through_dev python=3.12 -y
conda activate see_through_dev
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
pip install -r requirements.txt
ln -sf common/assets assets
Optional tiers (install as needed):
pip install -r requirements-training-deepspeed.txt # DeepSpeed ZeRO for multi-GPU training
pip install --no-build-isolation -r requirements-inference-annotators.txt # detectron2 + SAM2
pip install -r requirements-inference-mmdet.txt # mmcv/mmdet for anime instance segmentation
Key Conventions
- Working directory: always run from repo root (
/path/to/see-through-dev/) - Assets symlink:
ln -sf common/assets assetsat repo root (gitignored, create locally) - Workspace:
workspace/holds datasets β not tracked in git, seeworkspace/README.md - Requirements: unified
requirements.txtat repo root (pinned 2026-03-24, Python 3.12) - Tiered deps: task-oriented tier files at repo root (
requirements-training-deepspeed.txt, etc.) - Legacy refs: old per-subdir requirements renamed to
requirements-legacy-3.10.txt - common/ install: root requirements.txt includes
-e ./commonand-e ./annotatorsβ install from repo root - Test configs:
training/configs/test_*.yamlβ do not reducetarget_sizefor device-specific VRAM limits. Device-specific overrides go intraining/configs/archive_4090/(gitignored) - Config structure:
model_typemust be a top-level key in training configs (not nested undermodel_args)
HuggingFace Authentication
Private repos (e.g. 24yearsold/l2d_bodysamples_v3_zstd) require authentication.
If huggingface-cli is not logged in for this env, use the hf_credential file at repo root:
token = open("hf_credential").read().strip()
# Pass to HfApi:
api = HfApi(token=token)
# Or set env var before running scripts:
# HF_TOKEN=$(cat hf_credential) python script.py
The hf_credential file is gitignored. Never commit it.
Note: huggingface-hub>=1.0 moved huggingface-cli to a separate package (huggingface-cli).
If you need the CLI, install it explicitly: pip install huggingface-cli. Otherwise, use
HF_TOKEN env var or pass token= to API calls.
Security β CRITICAL
l2d_bodysamples_v3dataset must NEVER be made public (legal/ethical risk)- HF repos:
24yearsold/l2d_bodysamples_v3_zstd(private),live2d/Live2D_test_model_pack(public) - Never commit credentials β
.gitignorecovershf_credential,*.token,.env - Verify
.gitignoreon any repo restructure
Environment Quirks
- conda run: Use
conda run -n see_through_devin non-interactive shells (cannotconda activate) - GPU clash: Do not run training and inference tests concurrently β they compete for GPU memory
Known Issues
Annotator module mismatch: RESOLVED βui/ui/run_thread.pynow uses lazy imports fromannotators.animeinsseg.instance_segmentationandannotators.lang_sam.models.sam.Requirements version conflict: RESOLVED β unified env with Python 3.12, pinned deps.- Cross-env scripts:
extr_psd.py,extr_biseg.py,vis_segs.py,vis_texture.pyimport fromtalking_head(lives inanimation_demo/, separate env). These are not runnable insee_through_dev. - See
ISSUES.mdfor the full list.
Public Subtree (public/)
public/ is a git subtree linked to shitagaki-lab/see-through (public repo).
Dev is the source of truth β changes flow dev β public.
- Contents:
common/(full),annotators/(full),inference/scripts/(6 selected),inference/demo/bodypartseg_sam.ipynb, requirements (identical to dev root) - Remote:
public-repoβgit@github.com:shitagaki-lab/see-through.git - Publish:
git subtree split --prefix=public -b public-splitthen push (review commit messages first) - Pull:
git subtree pull --prefix=public public-repo main --squash - Clean working tree required:
subtree add/pullfails if there are uncommitted changes β stash first - Commit discipline: keep
public/changes in separate commits from dev-only changes - Sync check:
bash scripts/diff_public.shreports drift between dev andpublic/copies - Private HF repos (release blockers):
layerdifforg/seethroughv0.0.2_layerdiff3d,24yearsold/seethroughv0.0.1_marigold,24yearsold/l2d_sam_iter2β must be made public before external users can run inference scripts - See
docs/superpowers/specs/2026-03-31-public-subtree-design.mdfor the full design
Code Style
- No unnecessary changes β fix only what's asked
- Verify before claiming something works (fresh env, actual execution)
- Pin dependencies to exact versions
- Document optional/heavy deps as separate tiers, not in base requirements
HuggingFace Uploads
For large binary uploads, use HF_HUB_DISABLE_XET=1 with per-file HfApi.upload_file().
The hf-xet protocol is very slow for bulk binary blobs.