技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
training【数据与研究】Use GFPGAN training, FFHQ degradation datasets, BasicSR configs, landmark preprocessing, model internals, and checkpoint conversion workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a user asks to train, fine-tune, configure, or debug GFPGAN model/data workflows rather than simply restore an image.
FFHQDegradationDataset.options/train_gfpgan_v1.yml and options/train_gfpgan_v1_simple.yml-style config sections.GFPGANModel, GFPGANv1, GFPGANv1Clean, GFPGANBilinear, FacialComponentDiscriminator, ArcFace identity loss, and StyleGAN2 generator components.GFPGANer.enhance: use ../inference/.../../references/installation.md and ../../scripts/check_env.py.Before full training, validate imports and a config/data shape without starting a long run:
python sub-skills/training/scripts/check_env.py --json
Generate a component-landmark file from FFHQ metadata when using crop_components: true:
python sub-skills/training/scripts/parse_ffhq_landmarks.py \
--json-path ffhq-dataset-v2.json \
--save-path FFHQ_eye_mouth_landmarks_512.pth \
--scale 0.5 \
--enlarge-ratio 1.4
Convert a bilinear/original GFPGAN checkpoint to a clean checkpoint when following the v1.2 fine-tuning path:
python sub-skills/training/scripts/convert_checkpoint_to_clean.py \
--ori-path bilinear_or_original_checkpoint.pth \
--save-path GFPGAN_clean_converted.pth \
--narrow 1 \
--channel-multiplier 2
references/workflows.md: training, fine-tuning, validation, landmark, and conversion workflows.references/configuration.md: YAML sections, network/loss/path/data settings, and config decision points.references/data-layout.md: disk/LMDB layout, landmark .pth schema, dataset outputs, and fixture checks.references/model-architecture.md: verified model/component signatures and behavior.references/troubleshooting.md: training-specific data, checkpoint, CUDA, OpenCV, and config failures.scripts/check_env.py: verifies training imports, key signatures, CUDA visibility, and optional dataset config readability.scripts/parse_ffhq_landmarks.py: parameterized FFHQ landmark parser adapted from the source script without hardcoded paths.scripts/convert_checkpoint_to_clean.py: parameterized checkpoint converter adapted from the source conversion script.crop_components: true, the training config must point to a compatible landmark .pth file.