Fix models
@ -1,26 +1,26 @@
|
|||||||
export const MODELS = {
|
export const MODELS = {
|
||||||
"realesrgan-x4plus": {
|
"upscayl-standard-4x": {
|
||||||
id: "realesrgan-x4plus",
|
id: "upscayl-standard-4x",
|
||||||
name: "Upscayl Standard",
|
name: "Upscayl Standard",
|
||||||
},
|
},
|
||||||
"realesrgan-x4fast": {
|
"upscayl-lite-4x": {
|
||||||
id: "realesrgan-x4fast",
|
id: "upscayl-lite-4x",
|
||||||
name: "Upscayl Lite",
|
name: "Upscayl Lite",
|
||||||
},
|
},
|
||||||
remacri: {
|
remacri: {
|
||||||
id: "remacri",
|
id: "remacri-4x",
|
||||||
name: "Remacri (Non-Commercial)",
|
name: "Remacri (Non-Commercial)",
|
||||||
},
|
},
|
||||||
ultramix_balanced: {
|
ultramix_balanced: {
|
||||||
id: "ultramix_balanced",
|
id: "ultramix-balanced-4x",
|
||||||
name: "Ultramix (Non-Commercial)",
|
name: "Ultramix (Non-Commercial)",
|
||||||
},
|
},
|
||||||
ultrasharp: {
|
ultrasharp: {
|
||||||
id: "ultrasharp",
|
id: "ultrasharp-4x",
|
||||||
name: "Ultrasharp (Non-Commercial)",
|
name: "Ultrasharp (Non-Commercial)",
|
||||||
},
|
},
|
||||||
"realesrgan-x4plus-anime": {
|
"digital-art-4x": {
|
||||||
id: "realesrgan-x4plus-anime",
|
id: "digital-art-4x",
|
||||||
name: "Digital Art",
|
name: "Digital Art",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -10,9 +10,9 @@ export const customModelsPathAtom = atomWithStorage<string | null>(
|
|||||||
|
|
||||||
export const selectedModelIdAtom = atomWithStorage<ModelId | string>(
|
export const selectedModelIdAtom = atomWithStorage<ModelId | string>(
|
||||||
"selectedModelId",
|
"selectedModelId",
|
||||||
"realesrgan-x4plus",
|
"upscayl-standard-4x",
|
||||||
);
|
);
|
||||||
export const doubleUpscaylAtom = atomWithStorage("selectedModelId", false);
|
export const doubleUpscaylAtom = atomWithStorage("doubleUpscayl", false);
|
||||||
export const gpuIdAtom = atomWithStorage("gpuId", "");
|
export const gpuIdAtom = atomWithStorage("gpuId", "");
|
||||||
export const saveImageAsAtom = atomWithStorage<ImageFormat>(
|
export const saveImageAsAtom = atomWithStorage<ImageFormat>(
|
||||||
"saveImageAs",
|
"saveImageAs",
|
||||||
|
@ -167,6 +167,8 @@ const MainContent = ({
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const items = e.clipboardData.items;
|
const items = e.clipboardData.items;
|
||||||
const files = e.clipboardData.files;
|
const files = e.clipboardData.files;
|
||||||
|
console.log("🚀 => files:", files);
|
||||||
|
|
||||||
if (items.length === 0 || files.length === 0) {
|
if (items.length === 0 || files.length === 0) {
|
||||||
toast({
|
toast({
|
||||||
title: t("ERRORS.INVALID_IMAGE_ERROR.TITLE"),
|
title: t("ERRORS.INVALID_IMAGE_ERROR.TITLE"),
|
||||||
|
@ -28,10 +28,10 @@ import {
|
|||||||
import { useToast } from "@/components/ui/use-toast";
|
import { useToast } from "@/components/ui/use-toast";
|
||||||
import UpscaylSteps from "./upscayl-tab/upscayl-steps";
|
import UpscaylSteps from "./upscayl-tab/upscayl-steps";
|
||||||
import SettingsTab from "./settings-tab";
|
import SettingsTab from "./settings-tab";
|
||||||
import Footer from "../Footer";
|
import Footer from "../footer";
|
||||||
import { NewsModal } from "../news-modal";
|
import { NewsModal } from "../news-modal";
|
||||||
import Tabs from "../Tabs";
|
import Tabs from "../tabs";
|
||||||
import Header from "../Header";
|
import Header from "../header";
|
||||||
import { ChevronLeftIcon } from "lucide-react";
|
import { ChevronLeftIcon } from "lucide-react";
|
||||||
import { logAtom } from "@/atoms/log-atom";
|
import { logAtom } from "@/atoms/log-atom";
|
||||||
import { ELECTRON_COMMANDS } from "@common/electron-commands";
|
import { ELECTRON_COMMANDS } from "@common/electron-commands";
|
||||||
@ -90,15 +90,6 @@ const Sidebar = ({
|
|||||||
const tileSize = useAtomValue(tileSizeAtom);
|
const tileSize = useAtomValue(tileSizeAtom);
|
||||||
const [showSidebar, setShowSidebar] = useAtom(showSidebarAtom);
|
const [showSidebar, setShowSidebar] = useAtom(showSidebarAtom);
|
||||||
|
|
||||||
const handleModelChange = (e: any) => {
|
|
||||||
setSelectedModelId(e.value);
|
|
||||||
logit("🔀 Model changed: ", e.value);
|
|
||||||
localStorage.setItem(
|
|
||||||
"model",
|
|
||||||
JSON.stringify({ label: e.label, value: e.value }),
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const upscaylHandler = async () => {
|
const upscaylHandler = async () => {
|
||||||
logit("🔄 Resetting Upscaled Image Path");
|
logit("🔄 Resetting Upscaled Image Path");
|
||||||
setUpscaledImagePath("");
|
setUpscaledImagePath("");
|
||||||
|
@ -18,11 +18,15 @@ import { customModelIdsAtom } from "@/atoms/models-list-atom";
|
|||||||
|
|
||||||
export default function SelectModel() {
|
export default function SelectModel() {
|
||||||
const [selectedModelId, setSelectedModelId] = useAtom(selectedModelIdAtom);
|
const [selectedModelId, setSelectedModelId] = useAtom(selectedModelIdAtom);
|
||||||
|
console.log("🚀 => selectedModelId:", selectedModelId);
|
||||||
|
|
||||||
const customModelIds = useAtomValue(customModelIdsAtom);
|
const customModelIds = useAtomValue(customModelIdsAtom);
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [zoomedModel, setZoomedModel] = useState<ModelId | null>(null);
|
const [zoomedModel, setZoomedModel] = useState<ModelId | null>(null);
|
||||||
|
|
||||||
const handleModelSelect = (model: ModelId | string) => {
|
const handleModelSelect = (model: ModelId | string) => {
|
||||||
|
console.log("🚀 => model:", model);
|
||||||
|
|
||||||
setSelectedModelId(model);
|
setSelectedModelId(model);
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
};
|
};
|
||||||
|
@ -176,7 +176,7 @@ function UpscaylSteps({
|
|||||||
<p
|
<p
|
||||||
className="cursor-pointer text-sm"
|
className="cursor-pointer text-sm"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
setDoubleUpscayl(!doubleUpscayl);
|
setDoubleUpscayl((prev) => !prev);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t("APP.DOUBLE_UPSCAYL.TITLE")}
|
{t("APP.DOUBLE_UPSCAYL.TITLE")}
|
||||||
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 718 KiB After Width: | Height: | Size: 718 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |