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
435fd211
Commit
435fd211
authored
Sep 29, 2022
by
d8ahazard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes, cleanup.
parent
d7374179
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
17 deletions
+5
-17
modules/ldsr_model_arch.py
modules/ldsr_model_arch.py
+4
-2
modules/modelloader.py
modules/modelloader.py
+0
-14
modules/swinir_model.py
modules/swinir_model.py
+1
-1
No files found.
modules/ldsr_model_arch.py
View file @
435fd211
...
...
@@ -101,8 +101,10 @@ class LDSR:
print
(
"Foo"
)
down_sample_rate
=
target_scale
/
4
print
(
f
"Downsample rate is {down_sample_rate}"
)
width_downsampled_pre
=
width_og
*
down_sample_rate
height_downsampled_pre
=
height_og
*
down_sample_method
wd
=
width_og
*
down_sample_rate
hd
=
height_og
*
down_sample_rate
width_downsampled_pre
=
int
(
wd
)
height_downsampled_pre
=
int
(
hd
)
if
down_sample_rate
!=
1
:
print
(
...
...
modules/modelloader.py
View file @
435fd211
...
...
@@ -118,11 +118,9 @@ def load_upscalers():
for
cls
in
Upscaler
.
__subclasses__
():
name
=
cls
.
__name__
module_name
=
cls
.
__module__
print
(
f
"Class: {name} and {module_name}"
)
module
=
importlib
.
import_module
(
module_name
)
class_
=
getattr
(
module
,
name
)
cmd_name
=
f
"{name.lower().replace('upscaler', '')}-models-path"
print
(
f
"CMD Name: {cmd_name}"
)
opt_string
=
None
try
:
opt_string
=
shared
.
opts
.
__getattr__
(
cmd_name
)
...
...
@@ -130,18 +128,6 @@ def load_upscalers():
pass
scaler
=
class_
(
opt_string
)
for
child
in
scaler
.
scalers
:
print
(
f
"Appending {child.name}"
)
datas
.
append
(
child
)
shared
.
sd_upscalers
=
datas
# for scaler in subclasses:
# print(f"Found scaler: {type(scaler).__name__}")
# try:
# scaler = scaler()
# for child in scaler.scalers:
# print(f"Appending {child.name}")
# datas.append[child]
# except:
# pass
# shared.sd_upscalers = datas
modules/swinir_model.py
View file @
435fd211
...
...
@@ -52,7 +52,7 @@ class UpscalerSwinIR(Upscaler):
def
load_model
(
self
,
path
,
scale
=
4
):
if
"http"
in
path
:
dl_name
=
"
%
s
%
s"
%
(
self
.
name
.
replace
(
" "
,
"_"
),
".pth"
)
dl_name
=
"
%
s
%
s"
%
(
self
.
model_
name
.
replace
(
" "
,
"_"
),
".pth"
)
filename
=
load_file_from_url
(
url
=
path
,
model_dir
=
self
.
model_path
,
file_name
=
dl_name
,
progress
=
True
)
else
:
filename
=
path
...
...
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