Files
ai-toolkit/ui/src/components/JobConfigViewer.tsx
T
Jaret Burkett 78cf049c29 Add support for ACE-Step 1.5 and ACE-Step 1.5 XL. Also added dataset captioning through the UI. (#785)
* Base ace step 1.5 xl added. Generating, still wip on training and ui

* Base training code done

* Fix some issues with caching text embeddings. Update sample cards to show audio

* Fix issue with quantizing ace step

* Add album artwork to samples with waveform.

* Cleanup logs

* Add album art endpoint to speed up album art loading

* Made an make video with artwork script

* Make ui handle basic audio models. Make multi line adjustments to the editor and better syntax hilighting.

* Add prompt tagging system for special tagged models.

* prompt tagging processing for ui working.

* Moved default samples to a special file so we can add more when needed and they can be adjusted for a specific model

* Add a captioner job with music captioner that is prepped for use with the ui

* Add basit ui setup for captioning modal and handeling captioning jobs

* Starting captioning job from ui working. Still better management for it.

* Better filtering of job options in the job view for captioning jobs

* Added qwen3 vl as a captioner for images

* Have an indicator when a dataset is being captioned.

* Adjust the way caption jobs look in the queue

* Fix a few issues. Adjust defaults.

* Version bump

* Added ace step to the readme.
2026-04-09 15:02:03 -06:00

62 lines
1.4 KiB
TypeScript

'use client';
import { useEffect, useState } from 'react';
import YAML from 'yaml';
import Editor from '@monaco-editor/react';
import { Job } from '@prisma/client';
interface Props {
job: Job;
}
const yamlConfig: YAML.DocumentOptions &
YAML.SchemaOptions &
YAML.ParseOptions &
YAML.CreateNodeOptions &
YAML.ToStringOptions = {
indent: 2,
lineWidth: 999999999999,
defaultStringType: 'QUOTE_DOUBLE',
defaultKeyType: 'PLAIN',
directives: true,
};
function toYaml(obj: any): string {
const doc = new YAML.Document(obj, yamlConfig);
YAML.visit(doc, {
Scalar(_key, node) {
if (typeof node.value === 'string' && node.value.includes('\n')) {
node.type = YAML.Scalar.BLOCK_LITERAL;
}
},
});
return doc.toString(yamlConfig);
}
export default function JobConfigViewer({ job }: Props) {
const [editorValue, setEditorValue] = useState<string>('');
useEffect(() => {
if (job?.job_config) {
const yamlContent = toYaml(JSON.parse(job.job_config));
setEditorValue(yamlContent);
}
}, [job]);
return (
<>
<Editor
height="100%"
width="100%"
defaultLanguage="yaml"
value={editorValue}
theme="vs-dark"
options={{
minimap: { enabled: true },
scrollBeyondLastLine: false,
automaticLayout: true,
readOnly: true,
}}
/>
</>
);
}