Merge upstream/main into feat/ctrl-v

This commit is contained in:
abhishek-gaonkar
2024-10-06 16:44:09 +05:30
32 changed files with 500 additions and 235 deletions

View File

@@ -14,7 +14,7 @@ import { modelsPath } from "../utils/get-resource-paths";
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
import { BatchUpscaylPayload } from "../../common/types/types";
import showNotification from "../utils/show-notification";
import { DEFAULT_MODELS } from "../../common/models-list";
import { DEFAULT_MODELS_ID_LIST } from "../../common/models-list";
const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
const mainWindow = getMainWindow();
@@ -41,7 +41,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
fs.mkdirSync(outputFolderPath, { recursive: true });
}
const isDefaultModel = DEFAULT_MODELS.includes(model);
const isDefaultModel = DEFAULT_MODELS_ID_LIST.includes(model);
// UPSCALE
const upscayl = spawnUpscayl(

View File

@@ -18,7 +18,7 @@ import { ELECTRON_COMMANDS } from "../../common/electron-commands";
import { DoubleUpscaylPayload } from "../../common/types/types";
import { ImageFormat } from "../types/types";
import showNotification from "../utils/show-notification";
import { DEFAULT_MODELS } from "../../common/models-list";
import { DEFAULT_MODELS_ID_LIST } from "../../common/models-list";
import getFilenameFromPath from "../../common/get-file-name";
import decodePath from "../../common/decode-path";
import getDirectoryFromPath from "../../common/get-directory-from-path";
@@ -41,7 +41,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
const fullfileName = getFilenameFromPath(imagePath);
const fileName = parse(fullfileName).name;
const isDefaultModel = DEFAULT_MODELS.includes(model);
const isDefaultModel = DEFAULT_MODELS_ID_LIST.includes(model);
// COPY IMAGE TO TMP FOLDER

View File

@@ -16,7 +16,7 @@ import { getMainWindow } from "../main-window";
import { ImageUpscaylPayload } from "../../common/types/types";
import { ImageFormat } from "../types/types";
import showNotification from "../utils/show-notification";
import { DEFAULT_MODELS } from "../../common/models-list";
import { DEFAULT_MODELS_ID_LIST } from "../../common/models-list";
import getFilenameFromPath from "../../common/get-file-name";
import decodePath from "../../common/decode-path";
import getDirectoryFromPath from "../../common/get-directory-from-path";
@@ -55,7 +55,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
"." +
saveImageAs;
const isDefaultModel = DEFAULT_MODELS.includes(model);
const isDefaultModel = DEFAULT_MODELS_ID_LIST.includes(model);
// Check if windows can write the new filename to the file system
if (outFile.length >= 255) {

View File

@@ -1,6 +1,6 @@
import log from "electron-log";
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
import { getMainWindow } from "../main-window";
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
const logit = (...args: any) => {
const mainWindow = getMainWindow();