Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0609ce06
Commit
0609ce06
authored
Oct 07, 2022
by
Milly
Committed by
AUTOMATIC1111
Oct 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed duplicate definition model_path
parent
a65a4527
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4 additions
and
15 deletions
+4
-15
modules/bsrgan_model.py
modules/bsrgan_model.py
+0
-2
modules/esrgan_model.py
modules/esrgan_model.py
+0
-2
modules/ldsr_model.py
modules/ldsr_model.py
+0
-2
modules/realesrgan_model.py
modules/realesrgan_model.py
+0
-2
modules/scunet_model.py
modules/scunet_model.py
+0
-2
modules/swinir_model.py
modules/swinir_model.py
+0
-2
modules/upscaler.py
modules/upscaler.py
+4
-3
No files found.
modules/bsrgan_model.py
View file @
0609ce06
...
@@ -10,13 +10,11 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -10,13 +10,11 @@ from basicsr.utils.download_util import load_file_from_url
import
modules.upscaler
import
modules.upscaler
from
modules
import
devices
,
modelloader
from
modules
import
devices
,
modelloader
from
modules.bsrgan_model_arch
import
RRDBNet
from
modules.bsrgan_model_arch
import
RRDBNet
from
modules.paths
import
models_path
class
UpscalerBSRGAN
(
modules
.
upscaler
.
Upscaler
):
class
UpscalerBSRGAN
(
modules
.
upscaler
.
Upscaler
):
def
__init__
(
self
,
dirname
):
def
__init__
(
self
,
dirname
):
self
.
name
=
"BSRGAN"
self
.
name
=
"BSRGAN"
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
self
.
model_name
=
"BSRGAN 4x"
self
.
model_name
=
"BSRGAN 4x"
self
.
model_url
=
"https://github.com/cszn/KAIR/releases/download/v1.0/BSRGAN.pth"
self
.
model_url
=
"https://github.com/cszn/KAIR/releases/download/v1.0/BSRGAN.pth"
self
.
user_path
=
dirname
self
.
user_path
=
dirname
...
...
modules/esrgan_model.py
View file @
0609ce06
...
@@ -7,7 +7,6 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -7,7 +7,6 @@ from basicsr.utils.download_util import load_file_from_url
import
modules.esrgam_model_arch
as
arch
import
modules.esrgam_model_arch
as
arch
from
modules
import
shared
,
modelloader
,
images
,
devices
from
modules
import
shared
,
modelloader
,
images
,
devices
from
modules.paths
import
models_path
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.shared
import
opts
from
modules.shared
import
opts
...
@@ -76,7 +75,6 @@ class UpscalerESRGAN(Upscaler):
...
@@ -76,7 +75,6 @@ class UpscalerESRGAN(Upscaler):
self
.
model_name
=
"ESRGAN_4x"
self
.
model_name
=
"ESRGAN_4x"
self
.
scalers
=
[]
self
.
scalers
=
[]
self
.
user_path
=
dirname
self
.
user_path
=
dirname
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
super
()
.
__init__
()
super
()
.
__init__
()
model_paths
=
self
.
find_models
(
ext_filter
=
[
".pt"
,
".pth"
])
model_paths
=
self
.
find_models
(
ext_filter
=
[
".pt"
,
".pth"
])
scalers
=
[]
scalers
=
[]
...
...
modules/ldsr_model.py
View file @
0609ce06
...
@@ -7,13 +7,11 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -7,13 +7,11 @@ from basicsr.utils.download_util import load_file_from_url
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.ldsr_model_arch
import
LDSR
from
modules.ldsr_model_arch
import
LDSR
from
modules
import
shared
from
modules
import
shared
from
modules.paths
import
models_path
class
UpscalerLDSR
(
Upscaler
):
class
UpscalerLDSR
(
Upscaler
):
def
__init__
(
self
,
user_path
):
def
__init__
(
self
,
user_path
):
self
.
name
=
"LDSR"
self
.
name
=
"LDSR"
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
self
.
user_path
=
user_path
self
.
user_path
=
user_path
self
.
model_url
=
"https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1"
self
.
model_url
=
"https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1"
self
.
yaml_url
=
"https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1"
self
.
yaml_url
=
"https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1"
...
...
modules/realesrgan_model.py
View file @
0609ce06
...
@@ -8,14 +8,12 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -8,14 +8,12 @@ from basicsr.utils.download_util import load_file_from_url
from
realesrgan
import
RealESRGANer
from
realesrgan
import
RealESRGANer
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.paths
import
models_path
from
modules.shared
import
cmd_opts
,
opts
from
modules.shared
import
cmd_opts
,
opts
class
UpscalerRealESRGAN
(
Upscaler
):
class
UpscalerRealESRGAN
(
Upscaler
):
def
__init__
(
self
,
path
):
def
__init__
(
self
,
path
):
self
.
name
=
"RealESRGAN"
self
.
name
=
"RealESRGAN"
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
self
.
user_path
=
path
self
.
user_path
=
path
super
()
.
__init__
()
super
()
.
__init__
()
try
:
try
:
...
...
modules/scunet_model.py
View file @
0609ce06
...
@@ -9,14 +9,12 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -9,14 +9,12 @@ from basicsr.utils.download_util import load_file_from_url
import
modules.upscaler
import
modules.upscaler
from
modules
import
devices
,
modelloader
from
modules
import
devices
,
modelloader
from
modules.paths
import
models_path
from
modules.scunet_model_arch
import
SCUNet
as
net
from
modules.scunet_model_arch
import
SCUNet
as
net
class
UpscalerScuNET
(
modules
.
upscaler
.
Upscaler
):
class
UpscalerScuNET
(
modules
.
upscaler
.
Upscaler
):
def
__init__
(
self
,
dirname
):
def
__init__
(
self
,
dirname
):
self
.
name
=
"ScuNET"
self
.
name
=
"ScuNET"
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
self
.
model_name
=
"ScuNET GAN"
self
.
model_name
=
"ScuNET GAN"
self
.
model_name2
=
"ScuNET PSNR"
self
.
model_name2
=
"ScuNET PSNR"
self
.
model_url
=
"https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_gan.pth"
self
.
model_url
=
"https://github.com/cszn/KAIR/releases/download/v1.0/scunet_color_real_gan.pth"
...
...
modules/swinir_model.py
View file @
0609ce06
...
@@ -8,7 +8,6 @@ from basicsr.utils.download_util import load_file_from_url
...
@@ -8,7 +8,6 @@ from basicsr.utils.download_util import load_file_from_url
from
tqdm
import
tqdm
from
tqdm
import
tqdm
from
modules
import
modelloader
from
modules
import
modelloader
from
modules.paths
import
models_path
from
modules.shared
import
cmd_opts
,
opts
,
device
from
modules.shared
import
cmd_opts
,
opts
,
device
from
modules.swinir_model_arch
import
SwinIR
as
net
from
modules.swinir_model_arch
import
SwinIR
as
net
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.upscaler
import
Upscaler
,
UpscalerData
...
@@ -25,7 +24,6 @@ class UpscalerSwinIR(Upscaler):
...
@@ -25,7 +24,6 @@ class UpscalerSwinIR(Upscaler):
"/003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR"
\
"/003_realSR_BSRGAN_DFOWMFC_s64w8_SwinIR"
\
"-L_x4_GAN.pth "
"-L_x4_GAN.pth "
self
.
model_name
=
"SwinIR 4x"
self
.
model_name
=
"SwinIR 4x"
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
self
.
user_path
=
dirname
self
.
user_path
=
dirname
super
()
.
__init__
()
super
()
.
__init__
()
scalers
=
[]
scalers
=
[]
...
...
modules/upscaler.py
View file @
0609ce06
...
@@ -36,10 +36,11 @@ class Upscaler:
...
@@ -36,10 +36,11 @@ class Upscaler:
self
.
half
=
not
modules
.
shared
.
cmd_opts
.
no_half
self
.
half
=
not
modules
.
shared
.
cmd_opts
.
no_half
self
.
pre_pad
=
0
self
.
pre_pad
=
0
self
.
mod_scale
=
None
self
.
mod_scale
=
None
if
self
.
name
is
not
None
and
create_dirs
:
if
self
.
model_path
is
not
None
and
self
.
name
:
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
self
.
model_path
=
os
.
path
.
join
(
models_path
,
self
.
name
)
if
not
os
.
path
.
exists
(
self
.
model_path
)
:
if
self
.
model_path
and
create_dirs
:
os
.
makedirs
(
self
.
model_path
)
os
.
makedirs
(
self
.
model_path
,
exist_ok
=
True
)
try
:
try
:
import
cv2
import
cv2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment