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
2e7efe47
Commit
2e7efe47
authored
Jan 19, 2024
by
n0kovo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
a97147bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
modules/dat_model.py
modules/dat_model.py
+5
-7
No files found.
modules/dat_model.py
View file @
2e7efe47
import
os
import
sys
from
modules
import
modelloader
,
device
s
from
modules
import
modelloader
,
error
s
from
modules.shared
import
cmd_opts
,
opts
from
modules.upscaler
import
Upscaler
,
UpscalerData
from
modules.upscaler_utils
import
upscale_with_model
from
icecream
import
ic
class
UpscalerDAT
(
Upscaler
):
def
__init__
(
self
,
user_path
):
...
...
@@ -24,13 +22,13 @@ class UpscalerDAT(Upscaler):
if
model
.
name
in
opts
.
dat_enabled_models
:
self
.
scalers
.
append
(
model
)
def
do_upscale
(
self
,
img
,
selected_model
):
def
do_upscale
(
self
,
img
,
path
):
try
:
info
=
self
.
load_model
(
selected_model
)
except
Exception
as
e
:
info
=
self
.
load_model
(
path
)
except
Exception
:
errors
.
report
(
f
"Unable to load DAT model {path}"
,
exc_info
=
True
)
return
img
model_descriptor
=
modelloader
.
load_spandrel_model
(
info
.
local_data_path
,
device
=
self
.
device
,
...
...
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