Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mafiosnik777 committed Dec 13, 2022
1 parent d177c49 commit 6647882
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "enhancr",
"productName": "enhancr",
"version": "0.9.2",
"version": "0.9.3",
"private": true,
"description": "Interpolation/Upscaling AI",
"main": "src/app.js",
Expand Down
5 changes: 5 additions & 0 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@
<li id="trim-li"><input type="checkbox" id="trim-check" /><span> Trim using accurate cut <i id="preview-question"
class="fa-solid fa-circle-question"><span class="tooltip-text" id="trim-question">Default is keyframe cut (inacurrate but doesn't re-encode)</span></i></span></li>
</ul>
<ul style="list-style-type:none; visibility: hidden;" id="unsupported-list" class="animate__animated animate__fadeIn">
<div id="unsupported-side"><i class="fa-sharp fa-solid fa-ban"></i></div>
<li id="unsupported-li"><input type="checkbox" id="unsupported-check" /><span> Show unsupported engines <i id="preview-question"
class="fa-solid fa-circle-question"><span class="tooltip-text" id="trim-question">AMD and Intel GPUs don't support TensorRT inference, so they're hidden by default</span></i></span></li>
</ul>
<ul style="list-style-type:none; visibility: hidden;" id="hwencode-list" class="animate__animated animate__fadeIn">
<div id="hwencode-side">Encoding</div>
<li id="hwencode-li"><input type="checkbox" id="hwencode-check" /><span> Enable hardware encoding <i id="preview-question"
Expand Down
1 change: 1 addition & 0 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ async function shareVideo() {
const progressDone = document.getElementById("progress-done");

sessionStorage.setItem('uploadStatus', 'uploading');
// curl -i -F files[]=@overlord_dave.mkv https://up1.fileditch.com/upload.php
let cmd = `curl -F file=@"${pipeOutPath}" https://${bestServer}.gofile.io/uploadFile -o ${path.join(tempPath, '/upload.json')}`;
let term = spawn(cmd, [], { shell: true, stdio: ['inherit', 'pipe', 'pipe'] });
process.stdout.write('');
Expand Down
8 changes: 8 additions & 0 deletions src/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function saveSettings() {
var sensitivityCheck = document.getElementById("sensitivity-check").checked;
var sensitivity = document.getElementById("sensitivity").checked;
var hwEncodeCheck = document.getElementById("hwencode-check").checked;
var unsupportedCheck = document.getElementById("unsupported-check").checked;

var theme = sessionStorage.getItem('theme');

Expand Down Expand Up @@ -78,6 +79,7 @@ function saveSettings() {
sensitivityValue: sensitivity,
sensitivity: sensitivityCheck,
customModel: customModelCheck,
unsupportedEngines: unsupportedCheck,
systemPython: pythonCheck,
language: "english"
},
Expand Down Expand Up @@ -148,6 +150,7 @@ fs.readFile(path.join(appDataPath, '/.enhancr/settings.json'), (err, settings) =
document.getElementById("hwencode-check").checked = json.settings[0].hwEncode || false;
document.getElementById("sensitivity").checked = json.settings[0].sensitivityValue || 0.100;
document.getElementById("sensitivity-check").checked = json.settings[0].sensitivity || false;
document.getElementById("unsupported-check").checked = json.settings[0].unsupportedEngines || false;
} catch (error) {
console.error(error);
console.log('Incompatible settings.json detected, saving settings to overwrite incompatible one.')
Expand Down Expand Up @@ -262,6 +265,7 @@ function changePage() {
document.getElementById('trim-list').style.visibility = 'visible';
hwEncodeSettings.style.visibility = 'visible';
document.getElementById('sensitivity-list').style.visibility = 'visible';
document.getElementById('unsupported-list').style.visibility = 'visible';
tensorrtSettings.style.visibility = 'hidden';
tilingSettings.style.visibility = 'hidden';
shapeSettings.style.visibility = 'hidden';
Expand All @@ -274,6 +278,7 @@ function changePage() {
document.getElementById('trim-list').style.visibility = 'hidden';
hwEncodeSettings.style.visibility = 'hidden';
document.getElementById('sensitivity-list').style.visibility = 'hidden';
document.getElementById('unsupported-list').style.visibility = 'hidden';
} else if (pageSwitcher.innerHTML == '<span><i class="fa-solid fa-arrow-left" id="arrow-left"></i> Page 5 / 5</span>') {
pageSwitcher.innerHTML = '<span><i class="fa-solid fa-arrow-left" id="arrow-left"></i> Page 4 / 5</span>';
document.getElementById('realesrgan-list').style.visibility = 'hidden';
Expand All @@ -283,9 +288,12 @@ function changePage() {
document.getElementById('trim-list').style.visibility = 'visible';
hwEncodeSettings.style.visibility = 'visible';
document.getElementById('sensitivity-list').style.visibility = 'visible';
document.getElementById('unsupported-list').style.visibility = 'visible';
} else if (pageSwitcher.innerHTML == '<span><i class="fa-solid fa-arrow-left" id="arrow-left"></i> Page 4 / 5</span>') {
pageSwitcher.innerHTML = '<span><i class="fa-solid fa-arrow-left" id="arrow-left"></i> Page 3 / 5</span>';
document.getElementById('trim-list').style.visibility = 'hidden';
document.getElementById('unsupported-list').style.visibility = 'hidden';
document.getElementById('sensitivity-list').style.visibility = 'hidden';
hwEncodeSettings.style.visibility = 'hidden';
tensorrtSettings.style.visibility = 'visible';
tilingSettings.style.visibility = 'visible';
Expand Down
15 changes: 15 additions & 0 deletions src/js/themeengine.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var pythonCheck = document.getElementById('python-check');
var trimCheck = document.getElementById('trim-check');
var hwencodeCheck = document.getElementById('hwencode-check');
var sensitivityCheck = document.getElementById('sensitivity-check');
var unsupportedCheck = document.getElementById("unsupported-check");

var mediaInfoText = document.getElementsByClassName("info-text");
var tooltips = document.getElementsByClassName("tooltip-text");
Expand Down Expand Up @@ -66,6 +67,7 @@ function blueSelect() {
trimCheck.style.setProperty('--toggle-color', "#1e5cce");
hwencodeCheck.style.setProperty('--toggle-color', "#1e5cce");
sensitivityCheck.style.setProperty('--toggle-color', "#1e5cce");
unsupportedCheck.style.setProperty('--toggle-color', "#1e5cce");
pythonCheck.style.setProperty('--toggle-color', "#1e5cce");
progressDone.style.setProperty('--bar-color', "#1e5cce");

Expand Down Expand Up @@ -128,6 +130,7 @@ function pinkSelect() {
trimCheck.style.setProperty('--toggle-color', "#ce1e6c");
hwencodeCheck.style.setProperty('--toggle-color', "#ce1e6c");
sensitivityCheck.style.setProperty('--toggle-color', "#ce1e6c");
unsupportedCheck.style.setProperty('--toggle-color', "#ce1e6c");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#ce1e6c";
Expand Down Expand Up @@ -187,6 +190,7 @@ function greenSelect() {
trimCheck.style.setProperty('--toggle-color', "#9ece1e");
hwencodeCheck.style.setProperty('--toggle-color', "#9ece1e");
sensitivityCheck.style.setProperty('--toggle-color', "#9ece1e");
unsupportedCheck.style.setProperty('--toggle-color', "#9ece1e");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#9ece1e";
Expand Down Expand Up @@ -246,6 +250,7 @@ function purpleSelect() {
trimCheck.style.setProperty('--toggle-color', "#601ece");
hwencodeCheck.style.setProperty('--toggle-color', "#601ece");
sensitivityCheck.style.setProperty('--toggle-color', "#601ece");
unsupportedCheck.style.setProperty('--toggle-color', "#601ece");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#601ece";
Expand Down Expand Up @@ -306,6 +311,7 @@ function orangeSelect() {
trimCheck.style.setProperty('--toggle-color', "#e36812");
hwencodeCheck.style.setProperty('--toggle-color', "#e36812");
sensitivityCheck.style.setProperty('--toggle-color', "#e36812");
unsupportedCheck.style.setProperty('--toggle-color', "#e36812");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#e36812";
Expand Down Expand Up @@ -365,6 +371,7 @@ function yellowSelect() {
trimCheck.style.setProperty('--toggle-color', "#cece1b");
hwencodeCheck.style.setProperty('--toggle-color', "#cece1b");
sensitivityCheck.style.setProperty('--toggle-color', "#cece1b");
unsupportedCheck.style.setProperty('--toggle-color', "#cece1b");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#cece1b";
Expand Down Expand Up @@ -424,6 +431,7 @@ function redSelect() {
trimCheck.style.setProperty('--toggle-color', "#ce2a1e");
hwencodeCheck.style.setProperty('--toggle-color', "#ce2a1e");
sensitivityCheck.style.setProperty('--toggle-color', "#ce2a1e");
unsupportedCheck.style.setProperty('--toggle-color', "#ce2a1e");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#ce2a1e";
Expand Down Expand Up @@ -483,6 +491,7 @@ function sandSelect() {
trimCheck.style.setProperty('--toggle-color', "#E9DAC1");
hwencodeCheck.style.setProperty('--toggle-color', "#E9DAC1");
sensitivityCheck.style.setProperty('--toggle-color', "#E9DAC1");
unsupportedCheck.style.setProperty('--toggle-color', "#E9DAC1");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#E9DAC1";
Expand Down Expand Up @@ -542,6 +551,7 @@ function mintSelect() {
trimCheck.style.setProperty('--toggle-color', "#8FE3CF");
hwencodeCheck.style.setProperty('--toggle-color', "#8FE3CF");
sensitivityCheck.style.setProperty('--toggle-color', "#8FE3CF");
unsupportedCheck.style.setProperty('--toggle-color', "#8FE3CF");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#8FE3CF";
Expand Down Expand Up @@ -601,6 +611,7 @@ function salmonSelect() {
trimCheck.style.setProperty('--toggle-color', "#FFB3B3");
hwencodeCheck.style.setProperty('--toggle-color', "#FFB3B3");
sensitivityCheck.style.setProperty('--toggle-color', "#FFB3B3");
unsupportedCheck.style.setProperty('--toggle-color', "#FFB3B3");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#FFB3B3";
Expand Down Expand Up @@ -660,6 +671,7 @@ function eggSelect() {
trimCheck.style.setProperty('--toggle-color', "#FFEF82");
hwencodeCheck.style.setProperty('--toggle-color', "#FFEF82");
sensitivityCheck.style.setProperty('--toggle-color', "#FFEF82");
unsupportedCheck.style.setProperty('--toggle-color', "#FFEF82");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#FFEF82";
Expand Down Expand Up @@ -719,6 +731,7 @@ function lavenderSelect() {
trimCheck.style.setProperty('--toggle-color', "#AFB4FF");
hwencodeCheck.style.setProperty('--toggle-color', "#AFB4FF");
sensitivityCheck.style.setProperty('--toggle-color', "#AFB4FF");
unsupportedCheck.style.setProperty('--toggle-color', "#AFB4FF");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#AFB4FF";
Expand Down Expand Up @@ -778,6 +791,7 @@ function roseSelect() {
trimCheck.style.setProperty('--toggle-color', "#FF5D5D");
hwencodeCheck.style.setProperty('--toggle-color', "#FF5D5D");
sensitivityCheck.style.setProperty('--toggle-color', "#FF5D5D");
unsupportedCheck.style.setProperty('--toggle-color', "#FF5D5D");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#FF5D5D";
Expand Down Expand Up @@ -837,6 +851,7 @@ function greySelect() {
trimCheck.style.setProperty('--toggle-color', "#696969");
hwencodeCheck.style.setProperty('--toggle-color', "#696969");
sensitivityCheck.style.setProperty('--toggle-color', "#696969");
unsupportedCheck.style.setProperty('--toggle-color', "#696969");

for (var i = 0; i < queueProgressBar.length; i++) {
queueProgressBar[i].style.background = "#696969";
Expand Down
5 changes: 3 additions & 2 deletions src/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,7 @@ function getTheme() {

function setGPU() {
const gpuInfo = require('gpu-info');
let unsupportedCheck = document.getElementById('unsupported-check');
gpuInfo().then(function (data) {
var hasNVIDIA = false;
var hasAMD = false;
Expand All @@ -657,7 +658,7 @@ function setGPU() {
if (hasNVIDIA) {
sessionStorage.setItem('gpu', 'NVIDIA');
}
if (hasAMD) {
if (hasAMD && !unsupportedCheck.checked) {
sessionStorage.setItem('gpu', 'AMD');
document.getElementById('cain-trt').style.display = 'none';
document.getElementById('rife-trt').style.display = 'none';
Expand All @@ -668,7 +669,7 @@ function setGPU() {
document.getElementById('realesrgan-ncnn').click();
document.getElementById('anime-video-ncnn').click();
}
if (hasIntel) {
if (hasIntel && !unsupportedCheck.checked) {
sessionStorage.setItem('gpu', 'Intel');
document.getElementById('cain-trt').style.display = 'none';
document.getElementById('rife-trt').style.display = 'none';
Expand Down
1 change: 1 addition & 0 deletions src/main/default-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = {
sensitivityValue: 0.100,
sensitivity: false,
customModel: false,
unsupportedEngines: false,
systemPython: false,
language: 'english',
},
Expand Down
59 changes: 57 additions & 2 deletions src/scss/settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ input[type="checkbox"] {
border-radius: 10px;
margin-bottom: 128px;
visibility: hidden;
top: 27.5%;
top: 26.5%;
position: absolute;
}

Expand Down Expand Up @@ -587,6 +587,61 @@ input[type="checkbox"] {
background-color: var(--toggle-color);
}

#unsupported-list {
margin-top: 3.5px;
padding: 16px 125px 23px 10px;
display: inline-block;
width: 315px;
margin-left: 10px;
background: rgba(0, 0, 0, 0.12);
border-radius: 10px;
margin-bottom: 128px;
visibility: hidden;
top: 36.5%;
position: absolute;
}

#unsupported-list li {
padding-bottom: 8px;
margin-left: 28px;
}

#unsupported-li {
margin-left: 27px;
position: absolute;
top: 27%;
font-weight: 400;
}

#unsupported-side {
transform: rotate(-90deg);
font-size: 9pt;
top: 10%;
left: -0.8%;
background: rgba(0, 0, 0, 0.2);
width: 8.7%;
height: 84%;
border-top-left-radius: 10px;
position: absolute;
border-top-right-radius: 10px;
text-align: center;
vertical-align: middle;
line-height: 30px;
font-weight: 500;
}

#unsupported-question {
top: -22% !important;
width: 165px !important;
}

#unsupported-check:checked {
/* Fallback */
background-color: #3b94ff;
/* Dynamic value */
background-color: var(--toggle-color);
}

#hwencode-list {
margin-top: 3.5px;
padding: 16px 125px 50px 10px;
Expand Down Expand Up @@ -861,7 +916,7 @@ input[type="checkbox"] {
border-radius: 10px;
margin-bottom: 10px;
visibility: hidden;
top: 45%;
top: 46%;
position: absolute;
}

Expand Down

0 comments on commit 6647882

Please sign in to comment.