Need Help: First LoRA Training Attempt with Kohya SS (Docker) Failing
Topic in one sentence: Troubleshooting a Gradio dropdown component error when attempting to train a first LoRA model using Kohya SS in Docker.
Hello everyone,
I’m new to the community and trying to train my first LoRA model using Kohya SS, but I’ve run into some issues. I’d really appreciate any insight or help you could provide.
Setup & Process
- Running Kohya_ss GUI in Docker release v25.0.3 (latest version as of April 7, 2025)
- Training an SD1.5 model with custom images
- Used CVAT to label my dataset and exported as CVAT 1.1
- Ran a Python script to align my metadata with Kohya’s expected format
The Error
When attempting to train, I’m getting the following error from within the container:
Traceback (most recent call last):
File "/home/1000/.local/lib/python3.10/site-packages/gradio/queueing.py", line 625, in process_events
response = await route_utils.call_process_api(
File "/home/1000/.local/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/home/1000/.local/lib/python3.10/site-packages/gradio/blocks.py", line 2133, in process_api
inputs = await self.preprocess_data(
File "/home/1000/.local/lib/python3.10/site-packages/gradio/blocks.py", line 1814, in preprocess_data
processed_input.append(block.preprocess(inputs_cached))
File "/home/1000/.local/lib/python3.10/site-packages/gradio/components/dropdown.py", line 194, in preprocess
choice_values = [value for _, value in self.choices]
File "/home/1000/.local/lib/python3.10/site-packages/gradio/components/dropdown.py", line 194, in <listcomp>
choice_values = [value for _, value in self.choices]
ValueError: not enough values to unpack (expected 2, got 0)
This seems to indicate that Gradio is trying to process an empty or misformatted dropdown list, expecting (label, value)
tuples and getting either a flat list or nothing at all.
What I’ve Tried
Verified Docker and GPU setup is working correctly
Using the latest version of Kohya SS from the main GitHub repo
Training data is mounted correctly in
/app/data/NP_LORA_V1.0
, and contains.jpg/.png
+.txt
caption filesPretrained model (
stable-diffusion-v1-5.safetensors
) is located in/app/models
All presets (Dreambooth, Finetune, LoRA) exist in
/app/presets
Verified all dropdowns in the UI are populated (or untouched) before clicking “Print Training Command”
Tried to locate and patch
dropdown.py
inside the container (to add a safe fallback for empty lists), but:venv/bin/activate
does not exist~/.local/lib/...
does not existdropdown.py
could not be located viafind
orpython -c "import gradio; print(gradio.__file__)"
Goal
I’d like to resolve this error so I can use Kohya’s WebUI without Gradio crashing when I click on Print Training Command or Start Training. I’m trying to avoid patching or hacking around this unless absolutely necessary — ideally, I’d like a clean solution that works with the official Docker build.
Questions
- Has anyone encountered this specific error before with Kohya SS + Gradio?
- Could this be related to how I processed my CVAT image + caption dataset?
- Is there something specific I need to configure in the Kohya UI (or dropdown defaults) that I might be missing?
- Are there any known issues with the latest version (
v25.x
) that could cause this? - Where exactly is Gradio installed inside the current Docker container?
- Is there a known patch or fix for the
dropdown.py
unpacking issue?
Any help or guidance would be greatly appreciated! I’m eager to get my first LoRA model training successfully.
Thank you for taking the time to read this.