Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
Tile-Upscaler
Commits
fd4bad80
Commit
fd4bad80
authored
Aug 14, 2024
by
chenpangpang
Browse files
feat: 解决dcu不支持float16的问题
parent
4e7af75c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Tile-Upscaler/app.py
Tile-Upscaler/app.py
+3
-3
No files found.
Tile-Upscaler/app.py
View file @
fd4bad80
...
...
@@ -86,20 +86,20 @@ class LazyLoadPipeline:
def
setup_pipeline
(
self
):
print
(
"Setting up the pipeline..."
)
controlnet
=
ControlNetModel
.
from_single_file
(
"models/ControlNet/control_v11f1e_sd15_tile.pth"
,
torch_dtype
=
torch
.
float
16
"models/ControlNet/control_v11f1e_sd15_tile.pth"
,
torch_dtype
=
torch
.
float
32
)
safety_checker
=
StableDiffusionSafetyChecker
.
from_pretrained
(
"CompVis/stable-diffusion-safety-checker"
)
model_path
=
"models/models/Stable-diffusion/juggernaut_reborn.safetensors"
pipe
=
StableDiffusionControlNetImg2ImgPipeline
.
from_single_file
(
model_path
,
controlnet
=
controlnet
,
torch_dtype
=
torch
.
float
16
,
torch_dtype
=
torch
.
float
32
,
use_safetensors
=
True
,
safety_checker
=
safety_checker
)
vae
=
AutoencoderKL
.
from_single_file
(
"models/VAE/vae-ft-mse-840000-ema-pruned.safetensors"
,
torch_dtype
=
torch
.
float
16
torch_dtype
=
torch
.
float
32
)
pipe
.
vae
=
vae
pipe
.
load_textual_inversion
(
"models/embeddings/verybadimagenegative_v1.3.pt"
)
...
...
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