Add new model selection
@ -51,17 +51,16 @@ export default function SelectModel() {
|
|||||||
const modelId = modelData[0] as ModelId;
|
const modelId = modelData[0] as ModelId;
|
||||||
const model = modelData[1];
|
const model = modelData[1];
|
||||||
return (
|
return (
|
||||||
<Button
|
<button
|
||||||
key={modelId}
|
key={modelId}
|
||||||
variant="outline"
|
className="btn h-auto w-full flex-col items-start p-4"
|
||||||
className="h-auto w-full flex-col items-start p-4"
|
|
||||||
onClick={() => handleModelSelect(modelId)}
|
onClick={() => handleModelSelect(modelId)}
|
||||||
>
|
>
|
||||||
<div className="mb-2 font-semibold">{model.name}</div>
|
<div className="mb-2 font-semibold">{model.name}</div>
|
||||||
<div className="relative h-52 w-full overflow-hidden rounded-md">
|
<div className="relative h-52 w-full overflow-hidden rounded-md">
|
||||||
<div className="flex h-full w-full">
|
<div className="flex h-full w-full">
|
||||||
<img
|
<img
|
||||||
src={`/model-comparison/${model.name}/before.webp`}
|
src={`/model-comparison/${model.id}/before.webp`}
|
||||||
alt={`${model.name} Before`}
|
alt={`${model.name} Before`}
|
||||||
className="h-full w-1/2 object-cover"
|
className="h-full w-1/2 object-cover"
|
||||||
/>
|
/>
|
||||||
@ -90,19 +89,21 @@ export default function SelectModel() {
|
|||||||
<span className="sr-only">Zoom</span>
|
<span className="sr-only">Zoom</span>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</Button>
|
</button>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
<p className="font-semibold text-base-content">
|
||||||
|
Imported Custom Models
|
||||||
|
</p>
|
||||||
{customModelIds.map((customModel) => {
|
{customModelIds.map((customModel) => {
|
||||||
return (
|
return (
|
||||||
<Button
|
<button
|
||||||
key={customModel}
|
key={customModel}
|
||||||
variant="outline"
|
className="btn h-auto w-full flex-col items-start p-4"
|
||||||
className="h-auto w-full flex-col items-start p-4"
|
|
||||||
onClick={() => handleModelSelect(customModel)}
|
onClick={() => handleModelSelect(customModel)}
|
||||||
>
|
>
|
||||||
{customModel}
|
{customModel}
|
||||||
</Button>
|
</button>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
@ -141,15 +142,13 @@ export default function SelectModel() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<button
|
||||||
variant="secondary"
|
className="btn btn-circle btn-secondary absolute right-4 top-4"
|
||||||
size="icon"
|
|
||||||
className="absolute right-4 top-4"
|
|
||||||
onClick={() => setZoomedModel(null)}
|
onClick={() => setZoomedModel(null)}
|
||||||
>
|
>
|
||||||
<X className="h-4 w-4" />
|
<X className="h-4 w-4" />
|
||||||
<span className="sr-only">Close</span>
|
<span className="sr-only">Close</span>
|
||||||
</Button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
@ -34,7 +34,7 @@ const DialogContent = React.forwardRef<
|
|||||||
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
||||||
hideCloseButton?: boolean;
|
hideCloseButton?: boolean;
|
||||||
}
|
}
|
||||||
>(({ className, children, ...props }, ref) => {
|
>(({ className, children, hideCloseButton, ...props }, ref) => {
|
||||||
const t = useTranslation();
|
const t = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -49,10 +49,12 @@ const DialogContent = React.forwardRef<
|
|||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
{!hideCloseButton && (
|
||||||
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
|
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none">
|
||||||
<X className="h-4 w-4" />
|
<X className="h-4 w-4" />
|
||||||
<span className="sr-only">{t("APP.DIALOG_BOX.CLOSE")}</span>
|
<span className="sr-only">{t("APP.DIALOG_BOX.CLOSE")}</span>
|
||||||
</DialogPrimitive.Close>
|
</DialogPrimitive.Close>
|
||||||
|
)}
|
||||||
</DialogPrimitive.Content>
|
</DialogPrimitive.Content>
|
||||||
</DialogPortal>
|
</DialogPortal>
|
||||||
);
|
);
|
||||||
|
BIN
renderer/public/model-comparison/realesrgan-x4fast/after.webp
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
renderer/public/model-comparison/realesrgan-x4fast/before.webp
Normal file
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 14 KiB |
BIN
renderer/public/model-comparison/realesrgan-x4plus/after.webp
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
renderer/public/model-comparison/realesrgan-x4plus/before.webp
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
renderer/public/model-comparison/remacri/after.webp
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
renderer/public/model-comparison/remacri/before.webp
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
renderer/public/model-comparison/ultramix_balanced/after.webp
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
renderer/public/model-comparison/ultramix_balanced/before.webp
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
renderer/public/model-comparison/ultrasharp/after.webp
Normal file
After Width: | Height: | Size: 718 KiB |
BIN
renderer/public/model-comparison/ultrasharp/before.webp
Normal file
After Width: | Height: | Size: 14 KiB |