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
renzhc
diffusers_dcu
Commits
c14c141b
Unverified
Commit
c14c141b
authored
Aug 04, 2023
by
asfiyab-nvidia
Committed by
GitHub
Aug 04, 2023
Browse files
TensorRT Inpaint pipeline: minor fixes (#4457)
Signed-off-by:
Asfiya Baig
<
asfiyab@nvidia.com
>
parent
79ef9e52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
examples/community/README.md
examples/community/README.md
+2
-2
examples/community/stable_diffusion_tensorrt_inpaint.py
examples/community/stable_diffusion_tensorrt_inpaint.py
+1
-1
No files found.
examples/community/README.md
View file @
c14c141b
...
...
@@ -1646,13 +1646,13 @@ from io import BytesIO
from
PIL
import
Image
import
torch
from
diffusers
import
PNDMScheduler
from
diffusers.pipelines.stable_diffusion
import
StableDiffusionI
mg2Img
Pipeline
from
diffusers.pipelines.stable_diffusion
import
StableDiffusionI
npaint
Pipeline
# Use the PNDMScheduler scheduler here instead
scheduler
=
PNDMScheduler
.
from_pretrained
(
"stabilityai/stable-diffusion-2-inpainting"
,
subfolder
=
"scheduler"
)
pipe
=
StableDiffusionI
mg2Img
Pipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2-inpainting"
,
pipe
=
StableDiffusionI
npaint
Pipeline
.
from_pretrained
(
"stabilityai/stable-diffusion-2-inpainting"
,
custom_pipeline
=
"stable_diffusion_tensorrt_inpaint"
,
revision
=
'fp16'
,
torch_dtype
=
torch
.
float16
,
...
...
examples/community/stable_diffusion_tensorrt_inpaint.py
View file @
c14c141b
...
...
@@ -1054,7 +1054,7 @@ class TensorRTStableDiffusionInpaintPipeline(StableDiffusionInpaintPipeline):
return_image
=
True
,
),
)
# print(mask)
mask
=
torch
.
nn
.
functional
.
interpolate
(
mask
,
size
=
(
latent_height
,
latent_width
))
mask
=
torch
.
cat
([
mask
]
*
2
)
...
...
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