计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
portrait-inference【效率与协作】Run, adapt, and troubleshoot Photo2Cartoon portrait inference across PyTorch weights, ONNX weights, and Cog-like predictor surfaces.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when you need to work with the model-side half of Photo2Cartoon:
Do not use this sub-skill for face detection, crop expansion, alignment, or segmentation math. Those details belong to the preprocessing sub-skill. Do not use it for training or checkpoint generation; that belongs to the data-and-training sub-skill. Do not use it for architecture internals; that belongs to the model-internals sub-skill.
scripts/check_photo2cartoon_assets.py.scripts/pytorch_inference_recipe.py.scripts/onnx_inference_recipe.py.references/cog-and-api-reference.md when adapting the Cog predictor surface.references/troubleshooting.md when inference fails.photo2cartoon_weights.pt, photo2cartoon_weights.onnx, seg_model_384.pb.256 x 256 face patch with alpha mask compositing.face = (face * mask + (1 - mask) * 255) / 127.5 - 1.uint8, composite against white, then save the RGB image.input, output output.Predictor.predict(photo: Path) returns an output path or None when no face is detected.