Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0e82250
Refactor: Remove easygui and replace dialogs with notifications
google-labs-jules[bot] Jun 23, 2025
3e1cfda
Refactor: Read version from pyproject.toml
google-labs-jules[bot] Jun 23, 2025
d3e6eba
Merge pull request #3305 from bmaltais/feature/version-from-pyproject
bmaltais Jun 23, 2025
c999f07
Merge pull request #3306 from bmaltais/remove-easygui-alternative
bmaltais Jun 23, 2025
547bf27
Fix misplaced documentation
bmaltais Jun 24, 2025
0e1c61c
Update readme
bmaltais Jun 24, 2025
3bb0527
More readme fix
bmaltais Jun 24, 2025
172a727
Expand all accordions option
bmaltais Jun 25, 2025
bce66da
Merge pull request #3310 from bmaltais/feat/expand_all_accordions
bmaltais Jun 25, 2025
7d136b0
Update config toml (#3312)
bmaltais Jun 25, 2025
cd510b8
Improve clarity and formatting of config example.toml (#3314)
bmaltais Jun 25, 2025
26a79fe
Improve config.toml example
bmaltais Jun 25, 2025
ed5f0b7
Fix missing keys
bmaltais Jun 25, 2025
466e0a3
Update expand_all_accordions to false
bmaltais Jun 25, 2025
15e27a2
wd14 tagger: add SmilingWolf/wd-eva02-large-tagger-v3 (#3315)
travisg Jun 28, 2025
01eb6ab
Bump crate-ci/typos from 1.32.0 to 1.34.0 (#3319)
dependabot[bot] Jul 1, 2025
278ef11
Updated Runpod template links (#3325)
ashleykleynhans Jul 13, 2025
c8dc6d1
Fix: Update Intel packages for oneAPI compatibility (#3341)
google-labs-jules[bot] Jul 13, 2025
60d99ec
Pull request for issue #3209 (#3342)
google-labs-jules[bot] Jul 13, 2025
d032186
Update installation links in README.md. (#3330)
MrZoraman Jul 13, 2025
80a6d1e
Pull request for issue #3336 (#3345)
google-labs-jules[bot] Jul 13, 2025
d534cb9
Feat/apply gui improvements to manual captioning (#3347)
bmaltais Jul 13, 2025
4c2e562
Feature/suggest target folder (#3348)
bmaltais Jul 13, 2025
2a8c059
Update to the latest sd-scripts sd3 branch commit
bmaltais Jul 13, 2025
12640ff
Flux Kontext manual caption tool (#3346)
bmaltais Jul 13, 2025
307e197
Fix pagitation (#3349)
rekgp Jul 14, 2025
f0d3e3f
Feature/update gui uv for colab parity (#3350)
bmaltais Jul 15, 2025
efc3c73
Fix installation error on MacBook M Series (issue #3281) (#3353)
cotulars Jul 18, 2025
e794bb8
feat: Add delete button to kontext manual captioning UI (#3354)
bmaltais Jul 18, 2025
80d3b02
Upgrade Pytorch for XPU (#3366)
WizardlyBump17 Jul 26, 2025
5536d3b
Bump crate-ci/typos from 1.32.0 to 1.34.0 (#3373)
dependabot[bot] Aug 11, 2025
6d2d2a1
feat: add sort-by-confidence option to WD14 captioning GUI
bmaltais May 8, 2026
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.32.0
uses: crate-ci/typos@v1.34.0
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ Support for Linux and macOS is also available. While Linux support is actively m
- [Colab](#-colab)
- [Runpod, Novita, Docker](#runpod-novita-docker)
- [Custom Path Defaults](#custom-path-defaults)
- [LoRA](#lora)
- [Server Options](#server-options)
- [LoRA](#lora)
- [Sample image generation during training](#sample-image-generation-during-training)
- [Troubleshooting](#troubleshooting)
- [Page File Limit](#page-file-limit)
Expand Down Expand Up @@ -101,9 +102,9 @@ I would like to express my gratitude to camenduru for their valuable contributio

These options are for users running training on hosted GPU infrastructure or containers.

- **[Runpod setup](docs/runpod_setup.md)** – Ready-made GPU background training via templates.
- **[Novita setup](docs/novita_setup.md)** – Similar to Runpod, but integrated into the Novita UI.
- **[Docker setup](docs/docker.md)** – For developers/sysadmins using containerized environments.
- **[Runpod setup](docs/installation_runpod.md)** – Ready-made GPU background training via templates.
- **[Novita setup](docs/installation_novita.md)** – Similar to Runpod, but integrated into the Novita UI.
- **[Docker setup](docs/installation_docker.md)** – For developers/sysadmins using containerized environments.


## Custom Path Defaults with `config.toml`
Expand Down Expand Up @@ -180,6 +181,21 @@ If you prefer to name your configuration file differently or store it in another

By effectively using `config.toml`, you can significantly speed up your training setup process. Always refer to the `config example.toml` for the most up-to-date list of configurable paths.

## Server Options

The `config.toml` file can also be used to configure the Gradio server.

### `allowed_paths`

The `allowed_paths` option allows you to specify a list of directories that the application can access. This is useful if you want to store your models, datasets, or other files on an external drive or in a location outside of the application's root directory.

**Example:**

```toml
[server]
allowed_paths = ["/mnt/external_drive/models", "/home/user/datasets"]
```

## LoRA

To train a LoRA, you can currently use the `train_network.py` code. You can create a LoRA network by using the all-in-one GUI.
Expand Down
3 changes: 3 additions & 0 deletions config example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
[settings]
use_shell = false # Use shell during process run of sd-scripts oython code. Most secure is false but some systems may require it to be true to properly run sd-scripts.

[server]
allowed_paths = [] # A list of paths that the application is allowed to access.

# Default folders location
[model]
models_dir = "./models" # Pretrained model name or path
Expand Down
36 changes: 36 additions & 0 deletions gui-uv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,40 @@ if [[ "$uv_quiet" == "--quiet" ]]; then
fi

git submodule update --init --recursive

# --- bitsandbytes compilation (optional, similar to Colab setup) ---
# The pyproject.toml specifies bitsandbytes, which uv will install.
# However, if you encounter issues with the pre-compiled version,
# you might need to compile it from source, similar to the Colab notebook.
# Uncomment and adapt the following lines if needed.
# Ensure you have the necessary build tools (like CUDA toolkit for cuda11x).

# BUILD_BITSANDBYTES_FROM_SOURCE=false # Set to true to enable
# if [ "$BUILD_BITSANDBYTES_FROM_SOURCE" = true ]; then
# echo "Attempting to build bitsandbytes from source..."
# if [ ! -d "bitsandbytes" ]; then
# git clone -b 0.41.0 https://github.com/TimDettmers/bitsandbytes
# fi
# cd bitsandbytes || exit 1
# # IMPORTANT: Adjust CUDA_VERSION if necessary for your setup (e.g., 118 for CUDA 11.8, 12x for CUDA 12.x)
# # The Colab notebook used CUDA_VERSION=118
# # Common options: cuda11x (for 11.0-11.8), cuda12x (for 12.0-12.x)
# # Ensure the corresponding CUDA toolkit is installed and in PATH.
# # For ROCm, the build process is different.
# # Check bitsandbytes documentation for the correct make target for your GPU/driver.
# # Example for CUDA 11.8:
# # CUDA_VERSION=118 make cuda11x
# # Example for CUDA 12.1:
# # make cuda12x
# # Then, install using uv within the environment (or pip if uv is not active yet for this part)
# # Assuming uv environment is active or will be activated by the main command:
# uv pip install .
# # Or, if building before activating the main uv environment:
# # python setup.py install
# cd .. || exit 1
# echo "bitsandbytes build attempt finished."
# fi
# --- end of bitsandbytes compilation ---

echo "Launching Kohya GUI via uv..."
uv run $uv_quiet kohya_gui.py --noverify "${args[@]}"
1 change: 1 addition & 0 deletions kohya_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def UI(**kwargs):
"share": False if kwargs.get("do_not_share", False) else kwargs.get("share", False),
"root_path": kwargs.get("root_path", None),
"debug": kwargs.get("debug", False),
"allowed_paths": config.allowed_paths,
}

# This line filters out any key-value pairs from `launch_params` where the value is `None`, ensuring only valid parameters are passed to the `launch` function.
Expand Down
7 changes: 7 additions & 0 deletions kohya_gui/class_gui_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __init__(self, config_file_path: str = "./config.toml"):
Initialize the KohyaSSGUIConfig class.
"""
self.config = self.load_config(config_file_path=config_file_path)
self.allowed_paths = self.get_allowed_paths()

def load_config(self, config_file_path: str = "./config.toml") -> dict:
"""
Expand Down Expand Up @@ -81,6 +82,12 @@ def get(self, key: str, default=None):
log.debug(f"Returned {data}")
return data

def get_allowed_paths(self) -> list:
"""
Retrieves the list of allowed paths from the [server] section of the config file.
"""
return self.get("server.allowed_paths", [])

def is_config_loaded(self) -> bool:
"""
Checks if the configuration was loaded from a file.
Expand Down
17 changes: 13 additions & 4 deletions kohya_gui/class_tensorboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
import subprocess
import time
import webbrowser
import shutil
import cpuinfo

try:
os.environ["TF_ENABLE_ONEDNN_OPTS"] = "0"
import tensorflow # Attempt to import tensorflow to check if it is installed
def check_avx_support():
try:
info = cpuinfo.get_cpu_info()
return 'avx' in info['flags']
except Exception:
return False

visibility = True
try:
if shutil.which("tensorboard") and check_avx_support():
visibility = True
else:
visibility = False
except ImportError:
visibility = False
Comment on lines +6 to 22

Expand Down
Loading
Loading