8000 Logs adds an extra 100.00% to progress message at certain times · Issue #847 · upscayl/upscayl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Logs adds an extra 100.00% to progress message at certain times #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
furkansimsekli opened this issue May 28, 2024 · 3 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@furkansimsekli
Copy link
Contributor
furkansimsekli commented May 28, 2024

Checklist

Describe the Bug

I have been using the app for a while, just today I realized there was an odd bug in the logs. While the upscaling continues, we see the logs BACKEND REPORTED and UPSCAYL_PROGRESS. Interestingly, it adds an extra 100.00% there at the message. The interval of this mistake depends on the procedure, sometimes it's once in 25%, sometimes once in 10%.

The main screen doesn't show 100.00% though.

To Reproduce

I haven't tried in different machines, but it happens everytime I do an upscayl. I tried 2X, 4X, REMACRI and DIGITAL ART.

Upscayl Version (or commit hash)

2.11.0

Platform

Linux

OS Version

Ubuntu 23.10

GPU Name

Matebook 14 with Ryzen 5 4600H (2020)

Expected Behavior

It shouldn't add an extra 100.00%, and only print the correct value.

Screenshots

No response

Logs

⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Real-ESRGAN)","value":"realesrgan-x4plus"}
⚙️ Setting gpuId to empty string
🔀 Setting model to 
🔀 Setting model to realesrgan-x4plus
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Real-ESRGAN)","value":"realesrgan-x4plus"}
⚙️ Setting gpuId to empty string
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Real-ESRGAN)","value":"realesrgan-x4plus"}
⚙️ Setting gpuId to empty string
🔀 Setting model to 
🔀 Setting model to realesrgan-x4plus
🔄 Resetting image paths
🎒 BACKEND REPORTED:  🖼️ Updating Image Path:  /home/f1nch/Downloads/house-wallpaper.jpg
🖼 Selected Image Path:  /home/f1nch/Downloads/house-wallpaper.jpg
📁 Selected Image Directory:  /home/f1nch/Downloads
🖼 imagePath:  /home/f1nch/Downloads/house-wallpaper.jpg
🔤 Extension:  jpg
🎒 BACKEND REPORTED:  📄 Selected File Path:  /home/f1nch/Downloads/house-wallpaper.jpg
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Real-ESRGAN)","value":"realesrgan-x4plus"}
⚙️ Setting gpuId to empty string
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Real-ESRGAN)","value":"realesrgan-x4plus"}
⚙️ Setting gpuId to empty string
🔀 Setting model to 
🔀 Setting model to realesrgan-x4plus
🔄 Resetting image paths
🎒 BACKEND REPORTED:  🖼️ Updating Image Path:  /home/f1nch/Pictures/Archive/finch.jpg
🖼 Selected Image Path:  /home/f1nch/Pictures/Archive/finch.jpg
📁 Selected Image Directory:  /home/f1nch/Pictures/Archive
🖼 imagePath:  /home/f1nch/Pictures/Archive/finch.jpg
🔤 Extension:  jpg
🎒 BACKEND REPORTED:  📄 Selected File Path:  /home/f1nch/Pictures/Archive/finch.jpg
🔄 Resetting Upscaled Image Path
🏁 UPSCAYL
🎒 BACKEND REPORTED:  ✅ Upscayl Variables:  {"model":"realesrgan-x4plus","gpuId":null,"saveImageAs":"png","inputDir":"/home/f1nch/Pictures/Archive","fileNameWithExt":"finch.jpg","outputDir":"/home/f1nch/Pictures/Archive","outFile":"/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus.png","fileName":"finch","scale":"4","compression":"0","customWidth":"","useCustomWidth":false,"tileSize":null}
🎒 BACKEND REPORTED:  📢 Upscayl Command:  -i,/home/f1nch/Pictures/Archive/finch.jpg,-o,/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus.png,-m,/tmp/.mount_upscayti7jYi/resources/models,-n,realesrgan-x4plus,-f,png,-c,0
🎒 BACKEND REPORTED:  👶 Updating Child Processes:  {"binary":"/tmp/.mount_upscayti7jYi/resources/bin/upscayl-bin","args":["/tmp/.mount_upscayti7jYi/resources/bin/upscayl-bin","-i","/home/f1nch/Pictures/Archive/finch.jpg","-o","/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus.png","-m","/tmp/.mount_upscayti7jYi/resources/models","-n","realesrgan-x4plus","-f","png","-c","0"]}
🎒 BACKEND REPORTED:  🛑 Updating Stopped:  false
🎒 BACKEND REPORTED:  🚀 Starting Upscayl - Copyright © 2024

🚧 UPSCAYL_PROGRESS:  🚀 Starting Upscayl - Copyright © 2024

🎒 BACKEND REPORTED:  ✨ Detected scale x4
✨ Using the default scale x4

🚧 UPSCAYL_PROGRESS:  ✨ Detected scale x4
✨ Using the default scale x4

🎒 BACKEND REPORTED:  [0 AMD Radeon Graphics (RADV RENOIR)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphics (RADV RENOIR)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RENOIR)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RENOIR)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1

🚧 UPSCAYL_PROGRESS:  [0 AMD Radeon Graphics (RADV RENOIR)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphics (RADV RENOIR)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RENOIR)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RENOIR)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1

🎒 BACKEND REPORTED:  [1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1

🚧 UPSCAYL_PROGRESS:  [1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1

🛑 Stopping Upscayl
🔄 Resetting image paths
🎒 BACKEND REPORTED:  🛑 Updating Stopped:  true
🎒 BACKEND REPORTED:  🛑 Stopping Upscaling Process 247531
🔀 Model changed:  realesrgan-x4plus-anime
🔀 Setting model to realesrgan-x4plus-anime
🔄 Resetting Upscaled Image Path
🚫 No valid image selected
🔄 Resetting image paths
🎒 BACKEND REPORTED:  🖼️ Updating Image Path:  /home/f1nch/Pictures/Archive/finch.jpg
🖼 Selected Image Path:  /home/f1nch/Pictures/Archive/finch.jpg
📁 Selected Image Directory:  /home/f1nch/Pictures/Archive
🖼 imagePath:  /home/f1nch/Pictures/Archive/finch.jpg
🔤 Extension:  jpg
🎒 BACKEND REPORTED:  📄 Selected File Path:  /home/f1nch/Pictures/Archive/finch.jpg
🔄 Resetting Upscaled Image Path
🏁 UPSCAYL
🎒 BACKEND REPORTED:  ✅ Upscayl Variables:  {"model":"realesrgan-x4plus-anime","gpuId":null,"saveImageAs":"png","inputDir":"/home/f1nch/Pictures/Archive","fileNameWithExt":"finch.jpg","outputDir":"/home/f1nch/Pictures/Archive","outFile":"/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus-anime.png","fileName":"finch","scale":"4","compression":"0","customWidth":"","useCustomWidth":false,"tileSize":null}
🎒 BACKEND REPORTED:  📢 Upscayl Command:  -i,/home/f1nch/Pictures/Archive/finch.jpg,-o,/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus-anime.png,-m,/tmp/.mount_upscayti7jYi/resources/models,-n,realesrgan-x4plus-anime,-f,png,-c,0
🎒 BACKEND REPORTED:  👶 Updating Child Processes:  {"binary":"/tmp/.mount_upscayti7jYi/resources/bin/upscayl-bin","args":["/tmp/.mount_upscayti7jYi/resources/bin/upscayl-bin","-i","/home/f1nch/Pictures/Archive/finch.jpg","-o","/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus.png","-m","/tmp/.mount_upscayti7jYi/resources/models","-n","realesrgan-x4plus","-f","png","-c","0"]}
🎒 BACKEND REPORTED:  🛑 Updating Stopped:  false
🎒 BACKEND REPORTED:  🚀 Starting Upscayl - Copyright © 2024
✨ Detected scale x4
✨ Using the default scale x4

🚧 UPSCAYL_PROGRESS:  🚀 Starting Upscayl - Copyright © 2024
✨ Detected scale x4
✨ Using the default scale x4

🎒 BACKEND REPORTED:  [0 AMD Radeon Graphics (RADV RENOIR)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphics (RADV RENOIR)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RENOIR)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RENOIR)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1

🚧 UPSCAYL_PROGRESS:  [0 AMD Radeon Graphics (RADV RENOIR)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphics (RADV RENOIR)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RENOIR)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RENOIR)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1

🎒 BACKEND REPORTED:  [1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1

🚧 UPSCAYL_PROGRESS:  [1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1

🎒 BACKEND REPORTED:  0.00%

🚧 UPSCAYL_PROGRESS:  0.00%

🎒 BACKEND REPORTED:  8.33%

🚧 UPSCAYL_PROGRESS:  8.33%

🎒 BACKEND REPORTED:  16.67%
100.00%

🚧 UPSCAYL_PROGRESS:  16.67%
100.00%

🎒 BACKEND REPORTED:  25.00%

🚧 UPSCAYL_PROGRESS:  25.00%

🎒 BACKEND REPORTED:  33.33%

🚧 UPSCAYL_PROGRESS:  33.33%

🎒 BACKEND REPORTED:  41.67%
100.00%

🚧 UPSCAYL_PROGRESS:  41.67%
100.00%

🎒 BACKEND REPORTED:  50.00%

🚧 UPSCAYL_PROGRESS:  50.00%

🎒 BACKEND REPORTED:  58.33%

🚧 UPSCAYL_PROGRESS:  58.33%

⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"Digital Art","value":"realesrgan-x4plus-anime"}
⚙️ Setting gpuId to empty string
🎒 BACKEND REPORTED:  66.67%
100.00%

🚧 UPSCAYL_PROGRESS:  66.67%
100.00%

🎒 BACKEND REPORTED:  75.00%

🚧 UPSCAYL_PROGRESS:  75.00%

🎒 BACKEND REPORTED:  83.33%

🚧 UPSCAYL_PROGRESS:  83.33%

🎒 BACKEND REPORTED:  91.67%
100.00%

🚧 UPSCAYL_PROGRESS:  91.67%
100.00%

🎒 BACKEND REPORTED:  🙌 Upscayled Successfully!

🚧 UPSCAYL_PROGRESS:  🙌 Upscayled Successfully!

🎒 BACKEND REPORTED:  💯 Done upscaling
upscaledImagePath:  /home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus-anime.png
💯 UPSCAYL_DONE:  /home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus-anime.png
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"Digital Art","value":"realesrgan-x4plus-anime"}
⚙️ Setting gpuId to empty string
🔀 Setting model to 
🔀 Setting model to realesrgan-x4plus-anime
🔀 Model changed:  remacri
🔀 Setting model to remacri
🔄 Resetting Upscaled Image Path
🏁 UPSCAYL
🎒 BACKEND REPORTED:  ✅ Upscayl Variables:  {"model":"remacri","gpuId":null,"saveImageAs":"png","inputDir":"/home/f1nch/Pictures/Archive","fileNameWithExt":"finch.jpg","outputDir":"/home/f1nch/Pictures/Archive","outFile":"/home/f1nch/Pictures/Archive/finch_upscayl_4x_remacri.png","fileName":"finch","scale":"4","compression":"0","customWidth":"","useCustomWidth":false,"tileSize":null}
🎒 BACKEND REPORTED:  📢 Upscayl Command:  -i,/home/f1nch/Pictures/Archive/finch.jpg,-o,/home/f1nch/Pictures/Archive/finch_upscayl_4x_remacri.png,-m,/tmp/.mount_upscayti7jYi/resources/models,-n,remacri,-f,png,-c,0
🎒 BACKEND REPORTED:  👶 Updating Child Processes:  {"binary":"/tmp/.mount_upscayti7jYi/resources/bin/upscayl-bin","args":["/tmp/.mount_upscayti7jYi/resources/bin/upscayl-bin","-i","/home/f1nch/Pictures/Archive/finch.jpg","-o","/home/f1nch/Pictures/Archive/finch_upscayl_4x_realesrgan-x4plus.png","-m","/tmp/.mount_upscayti7jYi/resources/models","-n","realesrgan-x4plus","-f","png","-c","0"]}
🎒 BACKEND REPORTED:  🛑 Updating Stopped:  false
🎒 BACKEND REPORTED:  🚀 Starting Upscayl - Copyright © 2024
✨ Using the default scale x4

🚧 UPSCAYL_PROGRESS:  🚀 Starting Upscayl - Copyright © 2024
✨ Using the default scale x4

🎒 BACKEND REPORTED:  [0 AMD Radeon Graphics (RADV RENOIR)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphics (RADV RENOIR)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RENOIR)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RENOIR)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1

🚧 UPSCAYL_PROGRESS:  [0 AMD Radeon Graphics (RADV RENOIR)]  queueC=1[4]  queueG=0[1]  queueT=0[1]
[0 AMD Radeon Graphi
8000
cs (RADV RENOIR)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[0 AMD Radeon Graphics (RADV RENOIR)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[0 AMD Radeon Graphics (RADV RENOIR)]  subgroup=64  basic=1  vote=1  ballot=1  shuffle=1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  fp16-p/s/a=1/1/1  int8-p/s/a=1/1/1
[1 llvmpipe (LLVM 15.0.7, 256 bits)]  subgroup=8  basic=1  vote=1  ballot=1  shuffle=1

🎒 BACKEND REPORTED:  0.00%

🚧 UPSCAYL_PROGRESS:  0.00%

🎒 BACKEND REPORTED:  8.33%

🚧 UPSCAYL_PROGRESS:  8.33%

⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Remacri)","value":"remacri"}
⚙️ Setting gpuId to empty string
🎒 BACKEND REPORTED:  16.67%
100.00%

🚧 UPSCAYL_PROGRESS:  16.67%
100.00%

🎒 BACKEND REPORTED:  25.00%

🚧 UPSCAYL_PROGRESS:  25.00%

🎒 BACKEND REPORTED:  33.33%

🚧 UPSCAYL_PROGRESS:  33.33%

🎒 BACKEND REPORTED:  41.67%
100.00%

🚧 UPSCAYL_PROGRESS:  41.67%
100.00%

🎒 BACKEND REPORTED:  50.00%

🚧 UPSCAYL_PROGRESS:  50.00%

🎒 BACKEND REPORTED:  58.33%

🚧 UPSCAYL_PROGRESS:  58.33%

🎒 BACKEND REPORTED:  66.67%
100.00%

🚧 UPSCAYL_PROGRESS:  66.67%
100.00%

🎒 BACKEND REPORTED:  75.00%

🚧 UPSCAYL_PROGRESS:  75.00%

🎒 BACKEND REPORTED:  83.33%

🚧 UPSCAYL_PROGRESS:  83.33%

🎒 BACKEND REPORTED:  91.67%
100.00%

🚧 UPSCAYL_PROGRESS:  91.67%
100.00%

🎒 BACKEND REPORTED:  🙌 Upscayled Successfully!

🚧 UPSCAYL_PROGRESS:  🙌 Upscayled Successfully!

🎒 BACKEND REPORTED:  💯 Done upscaling
upscaledImagePath:  /home/f1nch/Pictures/Archive/finch_upscayl_4x_remacri.png
💯 UPSCAYL_DONE:  /home/f1nch/Pictures/Archive/finch_upscayl_4x_remacri.png
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Remacri)","value":"remacri"}
⚙️ Setting gpuId to empty string
🔀 Setting model to 
🔀 Setting model to remacri
⚙️ Getting saveImageAs from localStorage:  png
⚙️ Getting model from localStorage:  {"label":"General Photo (Remacri)","value":"remacri"}
⚙️ Setting gpuId to empty string
@furkansimsekli furkansimsekli added the bug Something isn't working label May 28, 2024
@furkansimsekli
Copy link
Contributor Author

I'm willing to fix it if you have time to point me where to look at. I never wrote TypeScript and I'm not comfortable with the codebase here but doesn't hurt trying if it's not really hard.

Copy link
dosubot bot commented May 28, 2024

Hey @furkansimsekli! I'm here to help you with any bugs, questions, or contributions you have in mind. Let's work together to tackle this issue.

To fix the issue where the logs intermittently add an extra 100.00% to the progress message during the upscaling process, you should focus on the following areas in the codebase:

  1. ProgressBar Component:

    • File: renderer/components/upscayl-tab/view/ProgressBar.tsx
    • Look into the useEffect hook that processes the progress string:
      useEffect(() => {
        const progressString = progress.trim().replace(/\n/g, "");
        if (progressString.includes("Successful")) {
          setBatchProgress((prev) => prev + 1);
        }
      }, [progress]);
    • Ensure the progress string is being processed correctly and does not contain unexpected values.
  2. batchUpscayl Function:

    • File: electron/commands/batch-upscayl.ts
    • Review the onData function, which handles data received from the upscaling process:
      const onData = (data: any) => {
        if (!mainWindow) return;
        data = data.toString();
        mainWindow.webContents.send(
          COMMAND.FOLDER_UPSCAYL_PROGRESS,
          data.toString(),
        );
        if ((data as string).includes("Error")) {
          logit("❌ ", data);
          encounteredError = true;
        } else if (data.includes("Resizing")) {
          mainWindow.webContents.send(COMMAND.SCALING_AND_CONVERTING);
        }
      };
    • Ensure the data being sent does not contain unexpected values.
  3. doubleUpscayl Function:

    • File: electron/commands/double-upscayl.ts
    • Review the onData and onData2 functions:
      const onData = (data) => {
        if (!mainWindow) return;
        data = data.toString();
        mainWindow.webContents.send(COMMAND.DOUBLE_UPSCAYL_PROGRESS, data);
        if (data.inc
      8000
      ludes("Error") || data.includes("failed")) {
          upscayl.kill();
          failed = true;
        } else if (data.includes("Resizing")) {
          mainWindow.webContents.send(COMMAND.SCALING_AND_CONVERTING);
        }
      };
      
      const onData2 = (data) => {
        if (!mainWindow) return;
        data = data.toString();
        mainWindow.webContents.send(COMMAND.DOUBLE_UPSCAYL_PROGRESS, data);
        if (data.includes("Error")) {
          upscayl2.kill();
          failed2 = true;
        } else if (data.includes("Resizing")) {
          mainWindow.webContents.send(COMMAND.SCALING_AND_CONVERTING);
        }
      };
    • Ensure the progress data being sent is correctly formatted.
  4. imageUpscayl Function:

    • File: electron/commands/image-upscayl.ts
    • Review the onData handler:
      const onData = (data: string) => {
        logit(data.toString());
        mainWindow.setProgressBar(parseFloat(data.slice(0, data.length)) / 100);
        data = data.toString();
        mainWindow.webContents.send(COMMAND.UPSCAYL_PROGRESS, data.toString());
        if (data.includes("Error")) {
          upscayl.kill();
          failed = true;
        } else if (data.includes("Resizing")) {
          mainWindow.webContents.send(COMMAND.SCALING_AND_CONVERTING);
        }
      };
    • Ensure the data being sent does not contain unexpected values.

By reviewing and ensuring the correct processing and formatting of the progress data in these areas, you should be able to identify and fix the issue with the extra 100.00% being added to the progress message [1][2][3][4].

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@NayamAmarshe
Copy link
Member

Fixed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
0