Add LTX-2 Support (#644)
* WIP, adding support for LTX2 * Training on images working * Fix loading comfy models * Handle converting and deconverting lora so it matches original format * Reworked ui to habdle ltx and propert dataset default overwriting. * Update the way lokr saves to it is more compatable with comfy * Audio loading and synchronization/resampling is working * Add audio to training. Does it work? Maybe, still testing. * Fixed fps default issue for sound * Have ui set fps for accurate audio mapping on ltx * Added audio procession options to the ui for ltx * Clean up requirements
This commit is contained in:
@@ -56,18 +56,6 @@ const SampleImageCard: React.FC<SampleImageCardProps> = ({
|
||||
return () => observer.disconnect();
|
||||
}, [observerRoot, rootMargin]);
|
||||
|
||||
// Pause video when leaving viewport
|
||||
useEffect(() => {
|
||||
if (!isVideo(imageUrl)) return;
|
||||
const v = videoRef.current;
|
||||
if (!v) return;
|
||||
if (!isVisible && !v.paused) {
|
||||
try {
|
||||
v.pause();
|
||||
} catch {}
|
||||
}
|
||||
}, [isVisible, imageUrl]);
|
||||
|
||||
const handleLoad = () => setLoaded(true);
|
||||
|
||||
return (
|
||||
@@ -81,9 +69,11 @@ const SampleImageCard: React.FC<SampleImageCardProps> = ({
|
||||
src={`/api/img/${encodeURIComponent(imageUrl)}`}
|
||||
className="w-full h-full object-cover"
|
||||
preload="none"
|
||||
onLoad={handleLoad}
|
||||
playsInline
|
||||
muted
|
||||
loop
|
||||
autoPlay
|
||||
controls={false}
|
||||
/>
|
||||
) : (
|
||||
|
||||
@@ -7,6 +7,7 @@ import { Cog } from 'lucide-react';
|
||||
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/react';
|
||||
import { openConfirm } from './ConfirmModal';
|
||||
import { apiClient } from '@/utils/api';
|
||||
import { isVideo } from '@/utils/basic';
|
||||
|
||||
interface Props {
|
||||
imgPath: string | null; // current image path
|
||||
@@ -200,13 +201,24 @@ export default function SampleImageViewer({
|
||||
className="relative transform rounded-lg bg-gray-800 text-left shadow-xl transition-all data-closed:translate-y-4 data-closed:opacity-0 data-enter:duration-300 data-enter:ease-out data-leave:duration-200 data-leave:ease-in max-w-[95%] max-h-[95vh] data-closed:sm:translate-y-0 data-closed:sm:scale-95 flex flex-col overflow-hidden"
|
||||
>
|
||||
<div className="overflow-hidden flex items-center justify-center">
|
||||
{imgPath && (
|
||||
<img
|
||||
src={`/api/img/${encodeURIComponent(imgPath)}`}
|
||||
alt="Sample Image"
|
||||
className="w-auto h-auto max-w-[95vw] max-h-[82vh] object-contain"
|
||||
/>
|
||||
)}
|
||||
{imgPath &&
|
||||
(isVideo(imgPath) ? (
|
||||
<video
|
||||
src={`/api/img/${encodeURIComponent(imgPath)}`}
|
||||
className="w-auto h-auto max-w-[95vw] max-h-[82vh] object-contain"
|
||||
preload="none"
|
||||
playsInline
|
||||
loop
|
||||
autoPlay
|
||||
controls={true}
|
||||
/>
|
||||
) : (
|
||||
<img
|
||||
src={`/api/img/${encodeURIComponent(imgPath)}`}
|
||||
alt="Sample Image"
|
||||
className="w-auto h-auto max-w-[95vw] max-h-[82vh] object-contain"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
{/* # make full width */}
|
||||
<div className="bg-gray-950 text-sm flex justify-between items-center px-4 py-2">
|
||||
|
||||
Reference in New Issue
Block a user