Skip to content

Commit 490410c

Browse files
author
Jerome George
committed
Initial commit
0 parents  commit 490410c

36 files changed

Lines changed: 2552 additions & 0 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.packages
31+
.pub-cache/
32+
.pub/
33+
/build/
34+
35+
# Symbolication related
36+
app.*.symbols
37+
38+
# Obfuscation related
39+
app.*.map.json
40+
41+
# Android Studio will place build artifacts here
42+
/android/app/debug
43+
/android/app/profile
44+
/android/app/release

.metadata

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
17+
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
18+
- platform: windows
19+
create_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
20+
base_revision: 90c64ed42ba53a52d18f0cb3b17666c8662ed2a0
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'

LICENSE

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2023, Jerome George
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Upscaler GUI
2+
3+
A GUI frontend for [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN)
4+
5+
## Installation
6+
7+
- Download the Upscaler GUI from the releases page
8+
- Visit the official github repository of Real-ESRGAN and download the ` Windows executable files for Intel/AMD/Nvidia GPU.`
9+
- Unzip both files
10+
- Copy all files from Upscaler,s folder and place it in the Real-ESRGAN folder
11+
- Click on upscalergui.exe to start the application.
12+
- Its recommended to pin to taskbar or create a desktop shortcut
13+
14+
## ⚠️Warning
15+
We would like to clarify that the developer of this application is not affiliated with the `Real-ESRGAN `Project and does not claim any rights to it. The purpose of this application is to serve as a graphical user interface for the `Real-ESRGAN` application. Please note that the `Real-ESRGAN` application is not included with the upscaler app, and users are directed to download it from the source repository. As with any software, standard disclaimers apply.
16+
## 🎁Contribute
17+
We are pleased to offer the Upscaler GUI as a `free and open-source project`. We encourage you to utilize the application and provide feedback by reporting any issues or bugs on our issue page. Additionally, we welcome contributions in the form of new features and code to further enhance the project.
18+
19+
Your support is greatly appreciated. If you find our GitHub page to be of value, we kindly request that you consider leaving a `star` to help us continue to improve and provide quality content. Thank you for your consideration.

analysis_options.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
18+
#
19+
# Instead of disabling a lint rule for the entire project in the
20+
# section below, it can also be suppressed for a single line of code
21+
# or a specific dart file by using the `// ignore: name_of_lint` and
22+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
23+
# producing the lint.
24+
rules:
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
27+
28+
# Additional information about this file can be found at
29+
# https://dart.dev/guides/language/analysis-options

assets/icon.png

23.3 KB
Loading

assets/sdimg_lq.png

2.83 MB
Loading

assets/sdimg_up.png

4.05 MB
Loading

lib/commonbtn.dart

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
import 'package:flutter/material.dart';
2+
import 'package:toggle_switch/toggle_switch.dart';
3+
import 'package:upscalergui/execute.dart';
4+
5+
import 'constants.dart';
6+
7+
class commonbtn extends StatefulWidget {
8+
const commonbtn({super.key});
9+
10+
@override
11+
State<commonbtn> createState() => _commonbtnState();
12+
}
13+
14+
class _commonbtnState extends State<commonbtn> {
15+
bool _isProcessing = false;
16+
String dropdownValue = "realesr-animevideov3";
17+
@override
18+
Widget build(BuildContext context) {
19+
return Column(
20+
crossAxisAlignment: CrossAxisAlignment.start,
21+
mainAxisAlignment: MainAxisAlignment.start,
22+
children: [
23+
SizedBox(
24+
height: 18,
25+
),
26+
Text(
27+
"Model name",
28+
style: txtstyle,
29+
),
30+
Container(
31+
width: 230,
32+
alignment: Alignment.topLeft,
33+
child: DropdownButtonFormField<String>(
34+
value: dropdownValue,
35+
isExpanded: true,
36+
dropdownColor: bgcolor,
37+
icon: const Icon(Icons.arrow_circle_down_rounded),
38+
elevation: 1,
39+
items: [
40+
'realesr-animevideov3',
41+
'realesrgan-x4plus',
42+
'realesrgan-x4plus-anime',
43+
'realesrnet-x4plus'
44+
].map<DropdownMenuItem<String>>((String value) {
45+
return DropdownMenuItem<String>(
46+
value: value,
47+
child: Text(
48+
value,
49+
style: TextStyle(
50+
fontWeight: FontWeight.w400,
51+
color: btncolor,
52+
fontSize: 18),
53+
),
54+
);
55+
}).toList(),
56+
onChanged: (String? value) {
57+
setState(() {
58+
dropdownValue = value!;
59+
print(dropdownValue);
60+
mdname = dropdownValue;
61+
});
62+
},
63+
),
64+
),
65+
SizedBox(
66+
height: 18,
67+
),
68+
Text(
69+
"Upscale ratio",
70+
style: txtstyle,
71+
),
72+
SizedBox(
73+
height: 18,
74+
),
75+
ToggleSwitch(
76+
minWidth: 45.0,
77+
cornerRadius: 10.0,
78+
activeFgColor: Colors.black,
79+
activeBgColor: [btncolor, btncolor],
80+
inactiveFgColor: btncolor,
81+
initialLabelIndex: 3,
82+
totalSwitches: 4,
83+
labels: ['1x', '2x', '3x', '4x'],
84+
onToggle: (index) {
85+
upvalue = index!;
86+
upratio = upvalue + 1;
87+
},
88+
),
89+
SizedBox(
90+
height: 18,
91+
),
92+
Text(
93+
"Image format",
94+
style: txtstyle,
95+
),
96+
SizedBox(
97+
height: 18,
98+
),
99+
ToggleSwitch(
100+
minWidth: 60.0,
101+
cornerRadius: 10.0,
102+
activeFgColor: Colors.black,
103+
activeBgColor: [btncolor, btncolor],
104+
inactiveFgColor: btncolor,
105+
initialLabelIndex: 1,
106+
totalSwitches: 3,
107+
labels: ['Jpg', 'Png', 'Webp'],
108+
onToggle: (index) {
109+
print('switched to: $index');
110+
imgtypeno = index!;
111+
print("clciked up state");
112+
},
113+
),
114+
SizedBox(
115+
height: 25,
116+
),
117+
_isProcessing
118+
? CircularProgressIndicator()
119+
: MaterialButton(
120+
onPressed: () async {
121+
setState(() {
122+
_isProcessing = true;
123+
});
124+
await upscale();
125+
setState(() {
126+
_isProcessing = false;
127+
});
128+
if (errcheck == 1) {
129+
showerrdialog(context);
130+
setState(() {
131+
errcheck = 0;
132+
});
133+
} else {
134+
await showscsdialog(context);
135+
}
136+
},
137+
color: btncolor,
138+
height: 50,
139+
minWidth: 200,
140+
shape: RoundedRectangleBorder(
141+
borderRadius: BorderRadius.circular(5)),
142+
child: Text(
143+
"Upscale",
144+
style: TextStyle(color: Colors.black, fontSize: 22),
145+
),
146+
),
147+
],
148+
);
149+
}
150+
}

0 commit comments

Comments
 (0)