Fix LoRA training Error 500 - remove Radio serialization issue

The @gradio/client was wrapping Radio component values as
{"value": "replace", "__type__": "update"} instead of plain strings,
causing the update_settings Gradio call to fail and crash the server.

- /update-settings: removed Gradio call, settings are applied at save time
- /save-dataset: migrated to REST API (/v1/dataset/save) which accepts
  tag_position and other settings directly as strings
- Frontend: pass dataset settings (tag, position, etc.) when saving
This commit is contained in:
fspecii
2026-03-02 18:06:44 +02:00
parent a5879e60a5
commit 78426c00dd
3 changed files with 39 additions and 27 deletions
+4
View File
@@ -474,6 +474,10 @@ export const TrainingPanel: React.FC = () => {
const result = await trainingApi.saveDataset({
savePath: savePath || `./datasets/${datasetSettings.datasetName}.json`,
datasetName: datasetSettings.datasetName,
customTag: datasetSettings.customTag,
tagPosition: datasetSettings.tagPosition,
allInstrumental: datasetSettings.allInstrumental,
genreRatio: datasetSettings.genreRatio,
}, token);
setSaveStatus(result.status as string);
if (result.path) setSavePath(result.path);