安裝
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
1. 進入 https://github.com/bmaltais/kohya_ss 1.1 安裝 Required Dependencies 需要的工具 1.2 安裝 Installation 需要的步驟 2.出現 accelerate config 按 Enter 2.1 選擇 This machine 2.2 選擇 No distributed training 2.3 Do you want to run your training on CPU only (even if a GPU is available)? [yes/NO]:NO Do you wish to optimize your script with torch dynamo?[yes/NO]:NO Do you want to use DeepSpeed? [yes/NO]: No What GPU(s) (by id) should be used for training on this machine as a comma-seperated list? [all]:all Do you wish to use FP16 or BF16 : FP16 C:\Users\Jason/.cache\huggingface\accelerate\default_config.yaml command_file: null commands: null compute_environment: LOCAL_MACHINE deepspeed_config: {} distributed_type: 'NO' downcast_bf16: 'no' dynamo_backend: 'NO' fsdp_config: {} gpu_ids: all machine_rank: 0 main_process_ip: null main_process_port: null main_training_function: main megatron_lm_config: {} mixed_precision: fp16 num_machines: 1 num_processes: 1 rdzv_backend: static same_network: true tpu_name: null tpu_zone: null use_cpu: false 3. Optional: CUDNN 8.6 下載並把資料夾 (cudnn_windows) 放入 kohya_ss 再剛剛 PowerShell 執行 .\venv\Scripts\activate python .\tools\cudann_1.8_install.py 4. 右鍵 upgrade.ps1 > 用 PowerShell 執行 5. 執行 gui.bat |
訓練圖像
|
1 2 3 4 |
1. 大約 20 張 2. 長寬不用特別限定(不一定要裁成 512x512) 3. 最好有包含個角度,上半身 4. 不要去背 |
訓練
|
1 2 3 4 5 6 7 8 9 10 11 12 |
1. 切換到 DreamBooth Lora 2. Source Model 選擇基底模型 3. 切換到 Utilties > BLIP Captioning > Image folder to caption > 填入訓練圖片路徑 Prefix to add to BLIP caption : 加入你要的 tag Caption Images 4. 切換到 DreamBooth Lora Folder > 填入 Image folder / Output folder / Logging folder 5. 切換到 Training parameter Train batch size : 1~2 (可勾)Gradient checkpointing (可勾)Memory efficient attention 6. Train |