kohya_ss
kohya_ss copied to clipboard
Configs that specify custom `pretrained_model_name_or_path` saved before #292 fail to load
If a user attempts to load a config saved before #292 (?) and they have a custom model selected for Pretrained model name or path
, Gradio chokes upon trying to load the config, and endlessly prints the following error.
Error from Gradio
Traceback (most recent call last):
File "...\kohya_ss\venv\lib\site-packages\gradio\routes.py", line 384, in run_predict
output = await app.get_blocks().process_api(
File "...\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 1027, in process_api
data = self.postprocess_data(fn_index, result["prediction"], state)
File "...\kohya_ss\venv\lib\site-packages\gradio\blocks.py", line 939, in postprocess_data
if predictions[i] is components._Keywords.FINISHED_ITERATING:
TypeError: 'NoneType' object is not subscriptable
It seems like we don't handle older configs properly, and the model
's value []
is passed as is.
Manually updating old configs to specify "custom"
instead of []
seems to work fine.
- "model_list": [],
+ "model_list": "custom",
This seemed to be the only change I needed to make to get things working again.
The lack of a value for LoRA_type
did not seem to cause any issues.