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
eacf5e34
Unverified
Commit
eacf5e34
authored
Dec 05, 2023
by
Radamés Ajna
Committed by
GitHub
Dec 05, 2023
Browse files
Fix demofusion (#6049)
* Update pipeline_demofusion_sdxl.py * Update README.md
parent
4c05f785
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
examples/community/README.md
examples/community/README.md
+7
-3
examples/community/pipeline_demofusion_sdxl.py
examples/community/pipeline_demofusion_sdxl.py
+3
-1
No files found.
examples/community/README.md
View file @
eacf5e34
...
...
@@ -2870,10 +2870,14 @@ The original repo can be found at [repo](https://github.com/PRIS-CV/DemoFusion).
- `
show_image
` (`
bool
`, defaults to False):
Determine whether to show intermediate results during generation.
```
from
pipeline_demofusion_sdxl
import D
emoF
usion
SDXL
Pipeline
from
diffusers
import D
iff
usionPipeline
model_ckpt = "stabilityai/stable-diffusion-xl-base-1.0"
pipe = DemoFusionSDXLPipeline.from_pretrained(model_ckpt, torch_dtype=torch.float16)
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
custom_pipeline="pipeline_demofusion_sdxl",
custom_revision="main",
torch_dtype=torch.float16,
)
pipe = pipe.to("cuda")
prompt = "Envision a portrait of an elderly woman, her face a canvas of time, framed by a headscarf with muted tones of rust and cream. Her eyes, blue like faded denim. Her attire, simple yet dignified."
...
...
examples/community/pipeline_demofusion_sdxl.py
View file @
eacf5e34
...
...
@@ -36,7 +36,9 @@ from diffusers.utils.torch_utils import randn_tensor
if
is_invisible_watermark_available
():
from
.watermark
import
StableDiffusionXLWatermarker
from
diffusers.pipelines.stable_diffusion_xl.watermark
import
(
StableDiffusionXLWatermarker
,
)
logger
=
logging
.
get_logger
(
__name__
)
# pylint: disable=invalid-name
...
...
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