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
81087207
Commit
81087207
authored
Aug 24, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no-half commandline option to disable .half()
parent
7fd0f316
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
webui.py
webui.py
+2
-1
No files found.
webui.py
View file @
81087207
...
@@ -46,6 +46,7 @@ parser.add_argument("--ckpt", type=str, default="models/ldm/stable-diffusion-v1/
...
@@ -46,6 +46,7 @@ parser.add_argument("--ckpt", type=str, default="models/ldm/stable-diffusion-v1/
parser
.
add_argument
(
"--precision"
,
type
=
str
,
help
=
"evaluate at this precision"
,
choices
=
[
"full"
,
"autocast"
],
default
=
"autocast"
)
parser
.
add_argument
(
"--precision"
,
type
=
str
,
help
=
"evaluate at this precision"
,
choices
=
[
"full"
,
"autocast"
],
default
=
"autocast"
)
parser
.
add_argument
(
"--gfpgan-dir"
,
type
=
str
,
help
=
"GFPGAN directory"
,
default
=
'./GFPGAN'
)
parser
.
add_argument
(
"--gfpgan-dir"
,
type
=
str
,
help
=
"GFPGAN directory"
,
default
=
'./GFPGAN'
)
parser
.
add_argument
(
"--no-verify-input"
,
action
=
'store_true'
,
help
=
"do not verify input to check if it's too long"
)
parser
.
add_argument
(
"--no-verify-input"
,
action
=
'store_true'
,
help
=
"do not verify input to check if it's too long"
)
parser
.
add_argument
(
"--no-half"
,
action
=
'store_true'
,
help
=
"do not switch the model to 16-bit floats"
)
opt
=
parser
.
parse_args
()
opt
=
parser
.
parse_args
()
GFPGAN_dir
=
opt
.
gfpgan_dir
GFPGAN_dir
=
opt
.
gfpgan_dir
...
@@ -144,7 +145,7 @@ config = OmegaConf.load("configs/stable-diffusion/v1-inference.yaml")
...
@@ -144,7 +145,7 @@ config = OmegaConf.load("configs/stable-diffusion/v1-inference.yaml")
model
=
load_model_from_config
(
config
,
"models/ldm/stable-diffusion-v1/model.ckpt"
)
model
=
load_model_from_config
(
config
,
"models/ldm/stable-diffusion-v1/model.ckpt"
)
device
=
torch
.
device
(
"cuda"
)
if
torch
.
cuda
.
is_available
()
else
torch
.
device
(
"cpu"
)
device
=
torch
.
device
(
"cuda"
)
if
torch
.
cuda
.
is_available
()
else
torch
.
device
(
"cpu"
)
model
=
model
.
half
(
)
.
to
(
device
)
model
=
(
model
if
opt
.
no_half
else
model
.
half
()
)
.
to
(
device
)
def
image_grid
(
imgs
,
batch_size
,
round_down
=
False
):
def
image_grid
(
imgs
,
batch_size
,
round_down
=
False
):
...
...
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