Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
24372b5
Add toggles to the UI to add flipped versions of the datasets, X, Y o…
jaretburkett Aug 24, 2025
f48d21c
Upgrade a LoRA rank if the new one is larger so users can increase th…
jaretburkett Aug 24, 2025
ea01a1c
Fixed a bug where samples would fail if merging in lora on sampling f…
jaretburkett Aug 25, 2025
119653c
Force width, height, and num frames to always be the proper sizes for…
jaretburkett Aug 25, 2025
37eda7b
Add a tab to the UI to show the config file for the job. Read only.
jaretburkett Aug 25, 2025
d0338b8
Allow dropping images directly into dataset folder without having to …
jaretburkett Aug 25, 2025
5ad190b
Improve UI for sample images when there are no samples
jaretburkett Aug 27, 2025
fd13bd7
Add a Download button on samples to download all the samples as a zip…
jaretburkett Aug 27, 2025
1f541bc
Changes to handle a different DFE arch
jaretburkett Aug 27, 2025
fc5b416
Switch order to save first, then sample.
jaretburkett Aug 27, 2025
9ef425a
Fixed issue with training qwen with cached text embeds with a batch s…
jaretburkett Aug 28, 2025
e334941
Updated runpod docs
jaretburkett Aug 28, 2025
056711d
Fix issue with wan22 14b that woudl load both transformers temporaril…
jaretburkett Aug 28, 2025
6fc9ec1
Added example config for training wan22 14b 24GB on images
jaretburkett Aug 28, 2025
193c1b2
Add a watcher to constantly check for stop signal from the UI. This w…
jaretburkett Aug 31, 2025
0f2239c
Add force sample toggle to the ui
jaretburkett Aug 31, 2025
7040d8d
Preperation for audio
jaretburkett Sep 2, 2025
85dcae6
Set full size control images to default true
jaretburkett Sep 2, 2025
f699f4b
Add ability to set transparent color for control images
jaretburkett Sep 2, 2025
6450467
Comment out fast stop watcher. Could potentiallty be causing some wei…
jaretburkett Sep 4, 2025
af6fdaa
Add ability to train a full rank LoRA. (experimental)
jaretburkett Sep 9, 2025
b95c17d
Add initial support for chroma radiance
jaretburkett Sep 10, 2025
3666b11
DEF for fake vae and adjust scaling
jaretburkett Sep 13, 2025
218f673
Added support for new concept slider training script to CLI and UI
jaretburkett Sep 16, 2025
24a576a
Regularize the slider targets.
jaretburkett Sep 17, 2025
2120dc5
Upgrade job to new ui trainer to fix issue with slider config showing…
jaretburkett Sep 17, 2025
e4ae97e
add dataset-level distillation-style regularization
squewel Sep 17, 2025
e27e229
add prior_reg flag to FileItemDTO
squewel Sep 17, 2025
3cdf50c
Merge pull request #426 from squewel/prior_reg
jaretburkett Sep 18, 2025
390e21b
Integrate dataset level trigger words and allow them to be cached. De…
jaretburkett Sep 18, 2025
20dfe1b
Small double tap of detach on qwen just for good measure
jaretburkett Sep 18, 2025
28728a1
Added experimental dfe 5
jaretburkett Sep 21, 2025
f744751
Add stepped loss type
jaretburkett Sep 22, 2025
454be09
Initial support for qwen image edit plus
jaretburkett Sep 24, 2025
1069dee
Added ui sopport for multi control samples and datasets. Added qwen i…
jaretburkett Sep 25, 2025
0eaa3d2
Merge pull request #434 from ostris/qwen_image_edit_plus
jaretburkett Sep 25, 2025
e04f55c
Fixed scaling issue with control images
jaretburkett Sep 26, 2025
be99063
Remove dropout from cached text embeddings even if used specifies it …
jaretburkett Sep 26, 2025
6da4172
Add extra detachments just to be sure on qiep
jaretburkett Sep 27, 2025
3b1f7b0
Allow user to set the attention backend. Add method to recomver from …
jaretburkett Sep 27, 2025
98d35f3
Add hidream ARA
jaretburkett Sep 27, 2025
f0646a0
Reworked ui sample image modal to show more information and function …
jaretburkett Sep 27, 2025
4e207d9
Add seed to the sample image modal
jaretburkett Sep 28, 2025
c20240b
Add advanced menu on job to allow user to do things like make a job a…
jaretburkett Sep 28, 2025
c233a80
Reqorked visibility toggle on samples, should help when dealing with …
jaretburkett Sep 28, 2025
ebadb32
On samples page, auto scroll to bottom on load. Added a floating butt…
jaretburkett Sep 29, 2025
2e9de5e
Add ability to delete samples from the ui
jaretburkett Sep 29, 2025
6a77b0c
Merge branch 'main' into gs/merge-main
gschoeni Sep 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add ability to delete samples from the ui
  • Loading branch information
jaretburkett committed Sep 29, 2025
commit 2e9de5eb507439217b5bdaba116c53a6db6067a5
11 changes: 9 additions & 2 deletions ui/src/app/api/img/delete/route.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import { NextResponse } from 'next/server';
import fs from 'fs';
import { getDatasetsRoot } from '@/server/settings';
import { getDatasetsRoot, getTrainingFolder } from '@/server/settings';

export async function POST(request: Request) {
try {
const body = await request.json();
const { imgPath } = body;
let datasetsPath = await getDatasetsRoot();
const trainingPath = await getTrainingFolder();

// make sure the dataset path is in the image path
if (!imgPath.startsWith(datasetsPath)) {
if (!imgPath.startsWith(datasetsPath) && !imgPath.startsWith(trainingPath)) {
return NextResponse.json({ error: 'Invalid image path' }, { status: 400 });
}

// make sure it is an image
if (!/\.(jpg|jpeg|png|bmp|gif|tiff|webp)$/i.test(imgPath.toLowerCase())) {
return NextResponse.json({ error: 'Not an image' }, { status: 400 });
}

// if img doesnt exist, ignore
if (!fs.existsSync(imgPath)) {
return NextResponse.json({ success: true });
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/JobActionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from 'next/link';
import { Eye, Trash2, Pen, Play, Pause, Cog, NotebookPen } from 'lucide-react';
import { Eye, Trash2, Pen, Play, Pause, Cog } from 'lucide-react';
import { Button } from '@headlessui/react';
import { openConfirm } from '@/components/ConfirmModal';
import { Job } from '@prisma/client';
Expand Down
4 changes: 0 additions & 4 deletions ui/src/components/SampleImageCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ const SampleImageCard: React.FC<SampleImageCardProps> = ({
}
}, [isVisible, imageUrl]);

useEffect(() => {
console.log('SampleImageCard isVisible', isVisible, imageUrl);
}, [isVisible, imageUrl]);

const handleLoad = () => setLoaded(true);

return (
Expand Down
56 changes: 55 additions & 1 deletion ui/src/components/SampleImageViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,28 @@ import { useState, useEffect, useMemo, useCallback } from 'react';
import { createPortal } from 'react-dom';
import { Dialog, DialogBackdrop, DialogPanel } from '@headlessui/react';
import { SampleConfig, SampleItem } from '@/types';
import { Cog } from 'lucide-react';
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react';
import { openConfirm } from './ConfirmModal';
import { apiClient } from '@/utils/api';

interface Props {
imgPath: string | null; // current image path
numSamples: number; // number of samples per row
sampleImages: string[]; // all sample images
sampleConfig: SampleConfig | null;
onChange: (nextPath: string | null) => void; // parent setter
refreshSampleImages?: () => void;
}

export default function SampleImageViewer({ imgPath, numSamples, sampleImages, sampleConfig, onChange }: Props) {
export default function SampleImageViewer({
imgPath,
numSamples,
sampleImages,
sampleConfig,
onChange,
refreshSampleImages,
}: Props) {
const [mounted, setMounted] = useState(false);
const [isOpen, setIsOpen] = useState(Boolean(imgPath));

Expand Down Expand Up @@ -220,6 +232,48 @@ export default function SampleImageViewer({ imgPath, numSamples, sampleImages, s
</div>
</div>
</div>
<div className="absolute top-2 right-2 bg-gray-900 rounded-full p-1 leading-[0px] opacity-50 hover:opacity-100">
<Menu>
<MenuButton>
<Cog />
</MenuButton>
<MenuItems
anchor="bottom end"
className="bg-gray-900 border border-gray-700 rounded shadow-lg w-48 px-4 py-2 mt-1 z-50"
>
<MenuItem>
<div
className="cursor-pointer"
onClick={() => {
let message = `Are you sure you want to delete this sample? This action cannot be undone.`;
openConfirm({
title: 'Delete Sample',
message: message,
type: 'warning',
confirmText: 'Delete',
onConfirm: () => {
apiClient
.post('/api/img/delete', { imgPath: imgPath })
.then(() => {
console.log('Image deleted:', imgPath);
onChange(null);
if (refreshSampleImages) {
refreshSampleImages();
}
})
.catch(error => {
console.error('Error deleting image:', error);
});
},
});
}}
>
Delete Sample
</div>
</MenuItem>
</MenuItems>
</Menu>
</div>
</DialogPanel>
</div>
</div>
Expand Down
18 changes: 16 additions & 2 deletions ui/src/components/SampleImages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Button } from '@headlessui/react';
import { FaDownload } from 'react-icons/fa';
import { apiClient } from '@/utils/api';
import classNames from 'classnames';
import { FaCaretDown } from 'react-icons/fa';
import { FaCaretDown, FaCaretUp } from 'react-icons/fa';
import SampleImageViewer from './SampleImageViewer';

interface SampleImagesMenuProps {
Expand Down Expand Up @@ -88,6 +88,12 @@ export default function SampleImages({ job }: SampleImagesProps) {
}
};

const scrollToTop = () => {
if (containerRef.current) {
containerRef.current.scrollTo({ top: 0, behavior: 'instant' });
}
};

const PageInfoContent = useMemo(() => {
let icon = null;
let text = '';
Expand Down Expand Up @@ -276,9 +282,17 @@ export default function SampleImages({ job }: SampleImagesProps) {
sampleImages={sampleImages}
onChange={setPath => setSelectedSamplePath(setPath)}
sampleConfig={sampleConfig}
refreshSampleImages={refreshSampleImages}
/>
<div
className="fixed bottom-5 right-5 w-10 h-10 rounded-full bg-gray-900 shadow-lg flex items-center justify-center text-white opacity-80 hover:opacity-100 cursor-pointer"
className="fixed top-20 mt-4 right-6 w-10 h-10 rounded-full bg-gray-900 shadow-lg flex items-center justify-center text-white opacity-80 hover:opacity-100 cursor-pointer"
onClick={scrollToTop}
title="Scroll to Top"
>
<FaCaretUp className="text-gray-500 dark:text-gray-400" />
</div>
<div
className="fixed bottom-5 right-6 w-10 h-10 rounded-full bg-gray-900 shadow-lg flex items-center justify-center text-white opacity-80 hover:opacity-100 cursor-pointer"
onClick={scrollToBottom}
title="Scroll to Bottom"
>
Expand Down