じゃあ、**oupe_ec_text_soul_scaffold README(最終運用手順付き)**を作るね。

これ入れておけば、数ヶ月後に見返してもそのまま動かせるはず。


oupe_ec_text_soul_scaffold

手書き文字の「たましい」を抽出し、LoRA化して生成に使うための一式


1. 必要なツール

ツール 用途 入手先
Python 3.x 前処理・キャプション生成 python.org
Pillow 画像処理 pip install pillow
ComfyUI 画像生成 GitHub - Comfy-Org/ComfyUI
Stable Diffusion v1.5 ckpt ベースモデル Hugging Face等
ControlNet (scribble/lineart) 形状ガイド ComfyUI Manager
kohya_ss(sd-scripts) LoRA学習 GitHub - kohya-ss/sd-scripts

2. フォルダ構成

oupe_ec_text_soul_scaffold/
  data/
    handwriting/
      raw/           ← 元画像(スキャン・写真)
      clean/         ← 前処理後の画像(学習に使う)
  meta/
    captions.csv     ← 質感語メモ(任意)
    prompt_templates.txt ← 生成用テンプレ(任意)
  scripts/
    prepare_images.py  ← 前処理スクリプト
    make_captions.py   ← キャプション一括生成
  training/
    kohya_lora_config_example.json ← 学習設定サンプル
  exports/           ← 生成画像保存用(任意)


3. 運用手順

① 元画像の準備

② 前処理

cd scripts
python prepare_images.py

③ キャプション生成

python make_captions.py \\
  --dir ../data/handwriting/clean \\
  --text "your prompt or texture words"