Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v23.1.0 #2219

Merged
merged 45 commits into from
Apr 7, 2024
Merged

v23.1.0 #2219

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
739da3a
Update setup common functions
bmaltais Mar 22, 2024
25f9378
BLIP2 Captioning (#2144)
bmaltais Mar 23, 2024
e50cb8a
Aligh windows requirements to new sd-scripts requirements
bmaltais Mar 24, 2024
f52167d
Merge branch 'dev' of https://github.com/bmaltais/kohya_ss into dev
bmaltais Mar 24, 2024
43069a8
Update Triton install warning
bmaltais Mar 24, 2024
64360ce
Fix issue where max_grad_norm = 0 would not show in the command line …
bmaltais Mar 25, 2024
85c2b37
Fix max grad norm issue in DB
bmaltais Mar 25, 2024
452a813
Update logging for validate_requirements.py (#2159)
Disty0 Mar 26, 2024
0a05c07
Update to sd-scripts dev branch
bmaltais Mar 26, 2024
0f889a8
Add gui support for noise_offset_random_strength, ip_noise_gamma, ip_…
bmaltais Mar 26, 2024
b0139c7
Add gui support for save_state_on_train_end
bmaltais Mar 26, 2024
9fd7cf8
Update requirements
bmaltais Mar 26, 2024
381e852
Add support for masked_loss to the GUI
bmaltais Mar 27, 2024
9df3ed9
Update readme and automate accelerate config on windows
bmaltais Mar 27, 2024
a185f2c
Update sd-script dev commit to latest
bmaltais Mar 27, 2024
d74361e
Update README
bmaltais Mar 27, 2024
5d4c448
AMD ROCm installer (#2167)
Disty0 Mar 27, 2024
791ae79
Update README
bmaltais Mar 29, 2024
ebc157b
Add support for Main process port
bmaltais Mar 30, 2024
666c860
Update sd-scripts version
bmaltais Mar 30, 2024
d504015
chore(docker): Fix bitsandbytes can't find cuda (#2178)
jim60105 Mar 30, 2024
2dc81c7
Update IPEX to 2.1.20+xpu (#2181)
Disty0 Mar 30, 2024
3736882
Merge branch 'dev' of https://github.com/bmaltais/kohya_ss into dev
bmaltais Mar 31, 2024
7251cb8
Bump crate-ci/typos from 1.18.2 to 1.19.0 (#2189)
dependabot[bot] Apr 1, 2024
c4a1104
Update sd-script and add new test config
bmaltais Apr 1, 2024
b3a78fe
Move Accelerate launch to own accordion (#2192)
bmaltais Apr 1, 2024
ce1369d
Add support for Debiased Estimation loss to dreambooth (#2194)
bmaltais Apr 2, 2024
d4e23f9
Update accelerate launch parameters
bmaltais Apr 2, 2024
17186c2
Add config.toml defaults for dataset preparation section (#2199)
bmaltais Apr 2, 2024
0a8395d
Move debiased estimation loss and v_pred like noise
bmaltais Apr 3, 2024
c78c1ab
Add new field for extra accelerate launch arguments (#2200)
bmaltais Apr 3, 2024
8bf7d32
Add support for --config parameter to kohya_gui.py
bmaltais Apr 3, 2024
94c6711
Update to latest sd-scripts dev branch ommit
bmaltais Apr 3, 2024
c827268
Cleanup old files and code
bmaltais Apr 3, 2024
49f7634
Format with black
bmaltais Apr 3, 2024
ec04263
Restructure files
bmaltais Apr 3, 2024
ef1dcaf
Fix warning messages
bmaltais Apr 4, 2024
0aa9141
Adding support for more config.toml values
bmaltais Apr 4, 2024
5bd439f
Add basic section to config example.toml
bmaltais Apr 4, 2024
e9c53d1
Add remaining values to config.toml
bmaltais Apr 4, 2024
7b74dbf
Add code to check config file folder path existance
bmaltais Apr 5, 2024
e8fa917
Ad new caption tool
bmaltais Apr 6, 2024
da5b774
Improve new caption tool
bmaltais Apr 6, 2024
67c3b90
Update to sd-scripts 0.8.7 release
bmaltais Apr 7, 2024
b452f4c
Merge branch 'master' into dev
bmaltais Apr 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/typos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
- uses: actions/checkout@v4

- name: typos-action
uses: crate-ci/typos@v1.18.2
uses: crate-ci/typos@v1.19.0
2 changes: 1 addition & 1 deletion .release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v23.0.15
v23.1.0
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"python.linting.enabled": true,
"python.formatting.provider": "yapf",
"DockerRun.DisableDockerrc": true,
"augment.enableAutomaticCompletions": false
"augment.enableAutomaticCompletions": true
}
52 changes: 39 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ ARG PIP_NO_WARN_SCRIPT_LOCATION=0
ARG PIP_ROOT_USER_ACTION="ignore"

# Install build dependencies
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends python3-launchpadlib git curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=aptlists-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/lib/apt/lists \
apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends python3-launchpadlib git curl

# Install PyTorch and TensorFlow
# The versions must align and be in sync with the requirements_linux_docker.txt
Expand All @@ -44,24 +44,49 @@ RUN --mount=type=cache,id=pip-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/r

# Replace pillow with pillow-simd (Only for x86)
ARG TARGETPLATFORM
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=aptlists-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/lib/apt/lists \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
apt-get update && apt-get install -y --no-install-recommends zlib1g-dev libjpeg62-turbo-dev build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
pip uninstall -y pillow && \
CC="cc -mavx2" pip install -U --force-reinstall pillow-simd; \
fi

FROM python:3.10-slim as final

ARG TARGETARCH
ARG TARGETVARIANT

ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility

WORKDIR /tmp

ENV CUDA_VERSION=12.1.1
ENV NV_CUDA_CUDART_VERSION=12.1.105-1
ENV NVIDIA_REQUIRE_CUDA=cuda>=12.1
ENV NV_CUDA_COMPAT_PACKAGE=cuda-compat-12-1

# Install CUDA partially
ADD https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64/cuda-keyring_1.0-1_all.deb .
RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=aptlists-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/lib/apt/lists \
dpkg -i cuda-keyring_1.0-1_all.deb && \
rm cuda-keyring_1.0-1_all.deb && \
sed -i 's/^Components: main$/& contrib/' /etc/apt/sources.list.d/debian.sources && \
apt-get update && \
apt-get install -y --no-install-recommends \
# Installing the whole CUDA typically increases the image size by approximately **8GB**.
# To decrease the image size, we opt to install only the necessary libraries.
# Here is the package list for your reference: https://developer.download.nvidia.com/compute/cuda/repos/debian11/x86_64
# !If you experience any related issues, replace the following line with `cuda-12-1` to obtain the complete CUDA package.
cuda-cudart-12-1=${NV_CUDA_CUDART_VERSION} ${NV_CUDA_COMPAT_PACKAGE} libcusparse-12-1 libnvjitlink-12-1

# Install runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends libgl1 libglib2.0-0 libjpeg62 libtcl8.6 libtk8.6 libgoogle-perftools-dev dumb-init && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \
--mount=type=cache,id=aptlists-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/lib/apt/lists \
apt-get update && \
apt-get install -y --no-install-recommends libgl1 libglib2.0-0 libjpeg62 libtcl8.6 libtk8.6 libgoogle-perftools-dev dumb-init

# Fix missing libnvinfer7
RUN ln -s /usr/lib/x86_64-linux-gnu/libnvinfer.so /usr/lib/x86_64-linux-gnu/libnvinfer.so.7 && \
Expand All @@ -84,8 +109,9 @@ COPY --link --chmod=775 LICENSE.md /licenses/LICENSE.md
COPY --link --chown=$UID:0 --chmod=775 --from=build /root/.local /home/$UID/.local
COPY --link --chown=$UID:0 --chmod=775 . /app

ENV PATH="/home/$UID/.local/bin:$PATH"
ENV PATH="/usr/local/cuda/lib:/usr/local/cuda/lib64:/home/$UID/.local/bin:$PATH"
ENV PYTHONPATH="${PYTHONPATH}:/home/$UID/.local/lib/python3.10/site-packages"
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
ENV LD_PRELOAD=libtcmalloc.so
ENV PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python

Expand All @@ -103,7 +129,7 @@ STOPSIGNAL SIGINT

# Use dumb-init as PID 1 to handle signals properly
ENTRYPOINT ["dumb-init", "--"]
CMD ["python3", "kohya_gui.py", "--listen", "0.0.0.0", "--server_port", "7860"]
CMD ["python3", "kohya_gui.py", "--listen", "0.0.0.0", "--server_port", "7860", "--headless"]

ARG VERSION
ARG RELEASE
Expand Down
Loading
Loading