mirror of https://github.com/bmaltais/kohya_ss
update
parent
086ce76d3d
commit
f01af5e8bc
|
|
@ -26,8 +26,8 @@ WORKDIR /app/sdxl_train_captioner
|
|||
RUN pip install xformers==0.0.31
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# 문제 발생 시 버전 고정: ==2.7.4.post1
|
||||
RUN pip install flash-attn --no-build-isolation
|
||||
# 문제 발생 시 버전 고정: ====2.8.0
|
||||
RUN pip install flash-attn==2.8.0.post2 --no-build-isolation
|
||||
|
||||
RUN mkdir -p /app/sdxl_train_captioner/dataset
|
||||
RUN mkdir -p /app/sdxl_train_captioner/models
|
||||
|
|
@ -38,5 +38,7 @@ COPY ./models /app/sdxl_train_captioner/models
|
|||
WORKDIR /app/sdxl_train_captioner/sd-scripts
|
||||
|
||||
RUN chmod +x ./entrypoint.sh
|
||||
RUN chmod +x ./run-train-auto.sh
|
||||
RUN chmod +x ./run-train-single.sh
|
||||
|
||||
ENTRYPOINT ["bash", "entrypoint.sh"]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
docker build --no-cache -t aicompanion/sdxl_train_captioner:0.9.8 .
|
||||
docker build --no-cache -t aicompanion/sdxl_train_captioner:1.0.0 .
|
||||
|
||||
docker tag aicompanion/sdxl_train_captioner:0.9.8 aicompanion/sdxl_train_captioner:latest
|
||||
docker tag aicompanion/sdxl_train_captioner:1.0.0 aicompanion/sdxl_train_captioner:latest
|
||||
|
|
@ -1 +1 @@
|
|||
docker-compose up -d --gpus all
|
||||
docker-compose up -d
|
||||
|
|
@ -1,6 +1 @@
|
|||
@echo off
|
||||
REM 첫 번째 argument를 명령어로 받아서 컨테이너에서 실행
|
||||
REM 모든 argument를 그대로 넘기려면 %* 사용
|
||||
docker exec -it sdxl_train_captioner bash -c "cd /app/sdxl_train_captioner/sd-scripts; ./run-train-auto.py 1 2>&1 | tee /app/sdxl_train_captioner/logs/train_$(date +%%Y%%m%%d_%%H%%M%%S).log"
|
||||
|
||||
pause
|
||||
docker exec -it sdxl_train_captioner bash -c "/app/sdxl_train_captioner/sd-scripts/run-train-auto.sh 1"
|
||||
|
|
|
|||
|
|
@ -1,58 +1,4 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM ===================================
|
||||
REM SDXL LoRA 단일 학습 (Windows → Docker)
|
||||
REM ===================================
|
||||
|
||||
REM 도움말
|
||||
if "%1"=="" (
|
||||
echo Usage: run-train-single.cmd --folder FOLDER [OPTIONS]
|
||||
echo.
|
||||
echo Examples:
|
||||
echo run-train-single.cmd --folder ../dataset/training/01_alice
|
||||
echo run-train-single.cmd --folder ../dataset/training/01_alice --epochs 25
|
||||
echo run-train-single.cmd --folder ../dataset/training/01_alice --lr 0.0002 --dim 64
|
||||
echo.
|
||||
echo All arguments are passed to Python script inside container.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM 현재 시간 (로그 파일명용)
|
||||
for /f "tokens=1-6 delims=/:. " %%a in ("%date% %time%") do (
|
||||
set timestamp=%%a%%b%%c_%%d%%e%%f
|
||||
)
|
||||
set timestamp=%timestamp: =0%
|
||||
|
||||
REM 모든 arguments를 하나의 문자열로 결합
|
||||
set args=%*
|
||||
|
||||
REM 작은따옴표 이스케이프 (Bash에서 안전하게)
|
||||
set args=%args:'='\''%
|
||||
|
||||
echo ===================================
|
||||
echo Starting SDXL LoRA Training
|
||||
echo ===================================
|
||||
echo Arguments: %args%
|
||||
echo Log file: train_%timestamp%.log
|
||||
echo ===================================
|
||||
echo.
|
||||
|
||||
REM Docker에서 실행
|
||||
docker exec -it sdxl_train_captioner bash -c "cd /app/sdxl_train_captioner/sd-scripts && python run-train-single.py %args% 2>&1 | tee /app/sdxl_train_captioner/logs/train_%timestamp%.log"
|
||||
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo.
|
||||
echo ===================================
|
||||
echo Training completed successfully!
|
||||
echo ===================================
|
||||
) else (
|
||||
echo.
|
||||
echo ===================================
|
||||
echo Training failed with error code: %ERRORLEVEL%
|
||||
echo ===================================
|
||||
)
|
||||
|
||||
endlocal
|
||||
|
||||
pause
|
||||
REM 단순히 CMD에서 인자 전달만
|
||||
docker exec -it sdxl_train_captioner bash -c "/app/sdxl_train_captioner/sd-scripts/run-train-single.sh %*"
|
||||
pause
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 49115c25e9a0ffc6479b8f35d3ac76ba5352ca5b
|
||||
Subproject commit 6a32358a24b870cd54fb27d13c2900f2509c9936
|
||||
Loading…
Reference in New Issue