bmaltais/kohya_ss

Loading configs fails with an `UnboundLocalError`

glindsey opened this issue · 1 comments

As of the latest commit while writing this (f6b261de5272136db4d6da1e09d15eba6d23ef6e), attempting to load a config file fails and results in the following error:

Loading config...
Traceback (most recent call last):
  File "...\kohya_ss\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "...\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "...\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "...\kohya_ss\venv\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "...\kohya_ss\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "...\kohya_ss\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "...\kohya_ss\dreambooth_gui.py", line 213, in open_configuration
    my_data = update_optimizer(my_data)
UnboundLocalError: local variable 'my_data' referenced before assignment

Reverting to commit 7f0e5683c6b4e784f4a20647dbfa45aaa579467c fixes this problem.

Fixed in the new update.