Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
diffusers
Commits
c0f5346a
Unverified
Commit
c0f5346a
authored
Feb 16, 2024
by
co63oc
Committed by
GitHub
Feb 15, 2024
Browse files
Fix procecss process (#6591)
* Fix words * Fix --------- Co-authored-by:
YiYi Xu
<
yixu310@gmail.com
>
parent
087daee2
Changes
61
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
34 additions
and
34 deletions
+34
-34
examples/community/ip_adapter_face_id.py
examples/community/ip_adapter_face_id.py
+2
-2
examples/community/latent_consistency_interpolate.py
examples/community/latent_consistency_interpolate.py
+2
-2
examples/community/llm_grounded_diffusion.py
examples/community/llm_grounded_diffusion.py
+2
-2
examples/community/lpw_stable_diffusion_xl.py
examples/community/lpw_stable_diffusion_xl.py
+1
-1
examples/community/pipeline_animatediff_controlnet.py
examples/community/pipeline_animatediff_controlnet.py
+2
-2
examples/community/pipeline_demofusion_sdxl.py
examples/community/pipeline_demofusion_sdxl.py
+1
-1
examples/community/pipeline_fabric.py
examples/community/pipeline_fabric.py
+2
-2
examples/community/pipeline_sdxl_style_aligned.py
examples/community/pipeline_sdxl_style_aligned.py
+1
-1
examples/community/pipeline_stable_diffusion_upscale_ldm3d.py
...ples/community/pipeline_stable_diffusion_upscale_ldm3d.py
+2
-2
examples/community/pipeline_stable_diffusion_xl_controlnet_adapter.py
...munity/pipeline_stable_diffusion_xl_controlnet_adapter.py
+1
-1
examples/community/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py
...ipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py
+1
-1
examples/community/stable_diffusion_ipex.py
examples/community/stable_diffusion_ipex.py
+2
-2
examples/community/stable_diffusion_repaint.py
examples/community/stable_diffusion_repaint.py
+2
-2
examples/research_projects/controlnetxs/pipeline_controlnet_xs.py
.../research_projects/controlnetxs/pipeline_controlnet_xs.py
+2
-2
examples/research_projects/controlnetxs/pipeline_controlnet_xs_sd_xl.py
...rch_projects/controlnetxs/pipeline_controlnet_xs_sd_xl.py
+1
-1
src/diffusers/pipelines/animatediff/pipeline_animatediff.py
src/diffusers/pipelines/animatediff/pipeline_animatediff.py
+2
-2
src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py
...pipelines/animatediff/pipeline_animatediff_video2video.py
+2
-2
src/diffusers/pipelines/controlnet/pipeline_controlnet.py
src/diffusers/pipelines/controlnet/pipeline_controlnet.py
+2
-2
src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
...users/pipelines/controlnet/pipeline_controlnet_img2img.py
+2
-2
src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py
...users/pipelines/controlnet/pipeline_controlnet_inpaint.py
+2
-2
No files found.
examples/community/ip_adapter_face_id.py
View file @
c0f5346a
...
@@ -848,7 +848,7 @@ class IPAdapterFaceIDStableDiffusionPipeline(
...
@@ -848,7 +848,7 @@ class IPAdapterFaceIDStableDiffusionPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -930,7 +930,7 @@ class IPAdapterFaceIDStableDiffusionPipeline(
...
@@ -930,7 +930,7 @@ class IPAdapterFaceIDStableDiffusionPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/latent_consistency_interpolate.py
View file @
c0f5346a
...
@@ -395,7 +395,7 @@ class LatentConsistencyModelWalkPipeline(
...
@@ -395,7 +395,7 @@ class LatentConsistencyModelWalkPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -477,7 +477,7 @@ class LatentConsistencyModelWalkPipeline(
...
@@ -477,7 +477,7 @@ class LatentConsistencyModelWalkPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/llm_grounded_diffusion.py
View file @
c0f5346a
...
@@ -1307,7 +1307,7 @@ class LLMGroundedDiffusionPipeline(
...
@@ -1307,7 +1307,7 @@ class LLMGroundedDiffusionPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -1391,7 +1391,7 @@ class LLMGroundedDiffusionPipeline(
...
@@ -1391,7 +1391,7 @@ class LLMGroundedDiffusionPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/lpw_stable_diffusion_xl.py
View file @
c0f5346a
...
@@ -789,7 +789,7 @@ class SDXLLongPromptWeightingPipeline(
...
@@ -789,7 +789,7 @@ class SDXLLongPromptWeightingPipeline(
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
prompt_2
=
prompt_2
or
prompt
prompt_2
=
prompt_2
or
prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
prompt_embeds_list
=
[]
prompt_embeds_list
=
[]
prompts
=
[
prompt
,
prompt_2
]
prompts
=
[
prompt
,
prompt_2
]
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
...
...
examples/community/pipeline_animatediff_controlnet.py
View file @
c0f5346a
...
@@ -247,7 +247,7 @@ class AnimateDiffControlNetPipeline(DiffusionPipeline, TextualInversionLoaderMix
...
@@ -247,7 +247,7 @@ class AnimateDiffControlNetPipeline(DiffusionPipeline, TextualInversionLoaderMix
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -329,7 +329,7 @@ class AnimateDiffControlNetPipeline(DiffusionPipeline, TextualInversionLoaderMix
...
@@ -329,7 +329,7 @@ class AnimateDiffControlNetPipeline(DiffusionPipeline, TextualInversionLoaderMix
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/pipeline_demofusion_sdxl.py
View file @
c0f5346a
...
@@ -289,7 +289,7 @@ class DemoFusionSDXLPipeline(DiffusionPipeline, FromSingleFileMixin, LoraLoaderM
...
@@ -289,7 +289,7 @@ class DemoFusionSDXLPipeline(DiffusionPipeline, FromSingleFileMixin, LoraLoaderM
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
prompt_2
=
prompt_2
or
prompt
prompt_2
=
prompt_2
or
prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
prompt_embeds_list
=
[]
prompt_embeds_list
=
[]
prompts
=
[
prompt
,
prompt_2
]
prompts
=
[
prompt
,
prompt_2
]
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
...
...
examples/community/pipeline_fabric.py
View file @
c0f5346a
...
@@ -233,7 +233,7 @@ class FabricPipeline(DiffusionPipeline):
...
@@ -233,7 +233,7 @@ class FabricPipeline(DiffusionPipeline):
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -304,7 +304,7 @@ class FabricPipeline(DiffusionPipeline):
...
@@ -304,7 +304,7 @@ class FabricPipeline(DiffusionPipeline):
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/pipeline_sdxl_style_aligned.py
View file @
c0f5346a
...
@@ -632,7 +632,7 @@ class StyleAlignedSDXLPipeline(
...
@@ -632,7 +632,7 @@ class StyleAlignedSDXLPipeline(
prompt_2
=
prompt_2
or
prompt
prompt_2
=
prompt_2
or
prompt
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
prompt_embeds_list
=
[]
prompt_embeds_list
=
[]
prompts
=
[
prompt
,
prompt_2
]
prompts
=
[
prompt
,
prompt_2
]
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
...
...
examples/community/pipeline_stable_diffusion_upscale_ldm3d.py
View file @
c0f5346a
...
@@ -250,7 +250,7 @@ class StableDiffusionUpscaleLDM3DPipeline(
...
@@ -250,7 +250,7 @@ class StableDiffusionUpscaleLDM3DPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -332,7 +332,7 @@ class StableDiffusionUpscaleLDM3DPipeline(
...
@@ -332,7 +332,7 @@ class StableDiffusionUpscaleLDM3DPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/pipeline_stable_diffusion_xl_controlnet_adapter.py
View file @
c0f5346a
...
@@ -363,7 +363,7 @@ class StableDiffusionXLControlNetAdapterPipeline(
...
@@ -363,7 +363,7 @@ class StableDiffusionXLControlNetAdapterPipeline(
prompt_2
=
prompt_2
or
prompt
prompt_2
=
prompt_2
or
prompt
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
prompt_embeds_list
=
[]
prompt_embeds_list
=
[]
prompts
=
[
prompt
,
prompt_2
]
prompts
=
[
prompt
,
prompt_2
]
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
...
...
examples/community/pipeline_stable_diffusion_xl_controlnet_adapter_inpaint.py
View file @
c0f5346a
...
@@ -512,7 +512,7 @@ class StableDiffusionXLControlNetAdapterInpaintPipeline(DiffusionPipeline, FromS
...
@@ -512,7 +512,7 @@ class StableDiffusionXLControlNetAdapterInpaintPipeline(DiffusionPipeline, FromS
prompt_2
=
prompt_2
or
prompt
prompt_2
=
prompt_2
or
prompt
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
prompt_embeds_list
=
[]
prompt_embeds_list
=
[]
prompts
=
[
prompt
,
prompt_2
]
prompts
=
[
prompt
,
prompt_2
]
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
...
...
examples/community/stable_diffusion_ipex.py
View file @
c0f5346a
...
@@ -449,7 +449,7 @@ class StableDiffusionIPEXPipeline(DiffusionPipeline, TextualInversionLoaderMixin
...
@@ -449,7 +449,7 @@ class StableDiffusionIPEXPipeline(DiffusionPipeline, TextualInversionLoaderMixin
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -513,7 +513,7 @@ class StableDiffusionIPEXPipeline(DiffusionPipeline, TextualInversionLoaderMixin
...
@@ -513,7 +513,7 @@ class StableDiffusionIPEXPipeline(DiffusionPipeline, TextualInversionLoaderMixin
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/community/stable_diffusion_repaint.py
View file @
c0f5346a
...
@@ -392,7 +392,7 @@ class StableDiffusionRepaintPipeline(DiffusionPipeline, TextualInversionLoaderMi
...
@@ -392,7 +392,7 @@ class StableDiffusionRepaintPipeline(DiffusionPipeline, TextualInversionLoaderMi
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -456,7 +456,7 @@ class StableDiffusionRepaintPipeline(DiffusionPipeline, TextualInversionLoaderMi
...
@@ -456,7 +456,7 @@ class StableDiffusionRepaintPipeline(DiffusionPipeline, TextualInversionLoaderMi
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/research_projects/controlnetxs/pipeline_controlnet_xs.py
View file @
c0f5346a
...
@@ -266,7 +266,7 @@ class StableDiffusionControlNetXSPipeline(
...
@@ -266,7 +266,7 @@ class StableDiffusionControlNetXSPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -348,7 +348,7 @@ class StableDiffusionControlNetXSPipeline(
...
@@ -348,7 +348,7 @@ class StableDiffusionControlNetXSPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
examples/research_projects/controlnetxs/pipeline_controlnet_xs_sd_xl.py
View file @
c0f5346a
...
@@ -274,7 +274,7 @@ class StableDiffusionXLControlNetXSPipeline(
...
@@ -274,7 +274,7 @@ class StableDiffusionXLControlNetXSPipeline(
prompt_2
=
prompt_2
or
prompt
prompt_2
=
prompt_2
or
prompt
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
prompt_2
=
[
prompt_2
]
if
isinstance
(
prompt_2
,
str
)
else
prompt_2
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
prompt_embeds_list
=
[]
prompt_embeds_list
=
[]
prompts
=
[
prompt
,
prompt_2
]
prompts
=
[
prompt
,
prompt_2
]
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
for
prompt
,
tokenizer
,
text_encoder
in
zip
(
prompts
,
tokenizers
,
text_encoders
):
...
...
src/diffusers/pipelines/animatediff/pipeline_animatediff.py
View file @
c0f5346a
...
@@ -280,7 +280,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
...
@@ -280,7 +280,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -362,7 +362,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
...
@@ -362,7 +362,7 @@ class AnimateDiffPipeline(DiffusionPipeline, TextualInversionLoaderMixin, IPAdap
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
src/diffusers/pipelines/animatediff/pipeline_animatediff_video2video.py
View file @
c0f5346a
...
@@ -291,7 +291,7 @@ class AnimateDiffVideoToVideoPipeline(DiffusionPipeline, TextualInversionLoaderM
...
@@ -291,7 +291,7 @@ class AnimateDiffVideoToVideoPipeline(DiffusionPipeline, TextualInversionLoaderM
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -373,7 +373,7 @@ class AnimateDiffVideoToVideoPipeline(DiffusionPipeline, TextualInversionLoaderM
...
@@ -373,7 +373,7 @@ class AnimateDiffVideoToVideoPipeline(DiffusionPipeline, TextualInversionLoaderM
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
src/diffusers/pipelines/controlnet/pipeline_controlnet.py
View file @
c0f5346a
...
@@ -360,7 +360,7 @@ class StableDiffusionControlNetPipeline(
...
@@ -360,7 +360,7 @@ class StableDiffusionControlNetPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -442,7 +442,7 @@ class StableDiffusionControlNetPipeline(
...
@@ -442,7 +442,7 @@ class StableDiffusionControlNetPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
src/diffusers/pipelines/controlnet/pipeline_controlnet_img2img.py
View file @
c0f5346a
...
@@ -353,7 +353,7 @@ class StableDiffusionControlNetImg2ImgPipeline(
...
@@ -353,7 +353,7 @@ class StableDiffusionControlNetImg2ImgPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -435,7 +435,7 @@ class StableDiffusionControlNetImg2ImgPipeline(
...
@@ -435,7 +435,7 @@ class StableDiffusionControlNetImg2ImgPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint.py
View file @
c0f5346a
...
@@ -478,7 +478,7 @@ class StableDiffusionControlNetInpaintPipeline(
...
@@ -478,7 +478,7 @@ class StableDiffusionControlNetInpaintPipeline(
batch_size
=
prompt_embeds
.
shape
[
0
]
batch_size
=
prompt_embeds
.
shape
[
0
]
if
prompt_embeds
is
None
:
if
prompt_embeds
is
None
:
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
prompt
=
self
.
maybe_convert_prompt
(
prompt
,
self
.
tokenizer
)
...
@@ -560,7 +560,7 @@ class StableDiffusionControlNetInpaintPipeline(
...
@@ -560,7 +560,7 @@ class StableDiffusionControlNetInpaintPipeline(
else
:
else
:
uncond_tokens
=
negative_prompt
uncond_tokens
=
negative_prompt
# textual inversion: proce
c
ss multi-vector tokens if necessary
# textual inversion: process multi-vector tokens if necessary
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
if
isinstance
(
self
,
TextualInversionLoaderMixin
):
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
uncond_tokens
=
self
.
maybe_convert_prompt
(
uncond_tokens
,
self
.
tokenizer
)
...
...
Prev
1
2
3
4
Next
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