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
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
37 additions
and
37 deletions
+37
-37
src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py
...pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py
+1
-1
src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py
...ffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py
+1
-1
src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
...pipelines/controlnet/pipeline_controlnet_sd_xl_img2img.py
+1
-1
src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion.py
...elines/deprecated/alt_diffusion/pipeline_alt_diffusion.py
+2
-2
src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py
...eprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py
+2
-2
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py
...ted/stable_diffusion_variants/pipeline_cycle_diffusion.py
+2
-2
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py
...sion_variants/pipeline_stable_diffusion_inpaint_legacy.py
+2
-2
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py
...usion_variants/pipeline_stable_diffusion_model_editing.py
+2
-2
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py
...diffusion_variants/pipeline_stable_diffusion_paradigms.py
+2
-2
src/diffusers/pipelines/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
...fusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
+2
-2
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py
...consistency_models/pipeline_latent_consistency_img2img.py
+2
-2
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_text2img.py
...onsistency_models/pipeline_latent_consistency_text2img.py
+2
-2
src/diffusers/pipelines/pia/pipeline_pia.py
src/diffusers/pipelines/pia/pipeline_pia.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py
...s/pipelines/stable_diffusion/pipeline_stable_diffusion.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_depth2img.py
...s/stable_diffusion/pipeline_stable_diffusion_depth2img.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_img2img.py
...nes/stable_diffusion/pipeline_stable_diffusion_img2img.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_inpaint.py
...nes/stable_diffusion/pipeline_stable_diffusion_inpaint.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py
...e_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py
...nes/stable_diffusion/pipeline_stable_diffusion_upscale.py
+2
-2
src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py
...sers/pipelines/stable_diffusion/pipeline_stable_unclip.py
+2
-2
No files found.
src/diffusers/pipelines/controlnet/pipeline_controlnet_inpaint_sd_xl.py
View file @
c0f5346a
...
@@ -358,7 +358,7 @@ class StableDiffusionXLControlNetInpaintPipeline(
...
@@ -358,7 +358,7 @@ class StableDiffusionXLControlNetInpaintPipeline(
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/controlnet/pipeline_controlnet_sd_xl.py
View file @
c0f5346a
...
@@ -351,7 +351,7 @@ class StableDiffusionXLControlNetPipeline(
...
@@ -351,7 +351,7 @@ class StableDiffusionXLControlNetPipeline(
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/controlnet/pipeline_controlnet_sd_xl_img2img.py
View file @
c0f5346a
...
@@ -400,7 +400,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline(
...
@@ -400,7 +400,7 @@ class StableDiffusionXLControlNetImg2ImgPipeline(
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/deprecated/alt_diffusion/pipeline_alt_diffusion.py
View file @
c0f5346a
...
@@ -373,7 +373,7 @@ class AltDiffusionPipeline(
...
@@ -373,7 +373,7 @@ class AltDiffusionPipeline(
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
)
...
@@ -455,7 +455,7 @@ class AltDiffusionPipeline(
...
@@ -455,7 +455,7 @@ class AltDiffusionPipeline(
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/deprecated/alt_diffusion/pipeline_alt_diffusion_img2img.py
View file @
c0f5346a
...
@@ -384,7 +384,7 @@ class AltDiffusionImg2ImgPipeline(
...
@@ -384,7 +384,7 @@ class AltDiffusionImg2ImgPipeline(
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
)
...
@@ -466,7 +466,7 @@ class AltDiffusionImg2ImgPipeline(
...
@@ -466,7 +466,7 @@ class AltDiffusionImg2ImgPipeline(
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/deprecated/stable_diffusion_variants/pipeline_cycle_diffusion.py
View file @
c0f5346a
...
@@ -341,7 +341,7 @@ class CycleDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin, Lor
...
@@ -341,7 +341,7 @@ class CycleDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin, Lor
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
)
...
@@ -423,7 +423,7 @@ class CycleDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin, Lor
...
@@ -423,7 +423,7 @@ class CycleDiffusionPipeline(DiffusionPipeline, TextualInversionLoaderMixin, Lor
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/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_inpaint_legacy.py
View file @
c0f5346a
...
@@ -311,7 +311,7 @@ class StableDiffusionInpaintPipelineLegacy(
...
@@ -311,7 +311,7 @@ class StableDiffusionInpaintPipelineLegacy(
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
)
...
@@ -393,7 +393,7 @@ class StableDiffusionInpaintPipelineLegacy(
...
@@ -393,7 +393,7 @@ class StableDiffusionInpaintPipelineLegacy(
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/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_model_editing.py
View file @
c0f5346a
...
@@ -263,7 +263,7 @@ class StableDiffusionModelEditingPipeline(DiffusionPipeline, TextualInversionLoa
...
@@ -263,7 +263,7 @@ class StableDiffusionModelEditingPipeline(DiffusionPipeline, TextualInversionLoa
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
)
...
@@ -345,7 +345,7 @@ class StableDiffusionModelEditingPipeline(DiffusionPipeline, TextualInversionLoa
...
@@ -345,7 +345,7 @@ class StableDiffusionModelEditingPipeline(DiffusionPipeline, TextualInversionLoa
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/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_paradigms.py
View file @
c0f5346a
...
@@ -273,7 +273,7 @@ class StableDiffusionParadigmsPipeline(
...
@@ -273,7 +273,7 @@ class StableDiffusionParadigmsPipeline(
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
)
...
@@ -355,7 +355,7 @@ class StableDiffusionParadigmsPipeline(
...
@@ -355,7 +355,7 @@ class StableDiffusionParadigmsPipeline(
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/deprecated/stable_diffusion_variants/pipeline_stable_diffusion_pix2pix_zero.py
View file @
c0f5346a
...
@@ -463,7 +463,7 @@ class StableDiffusionPix2PixZeroPipeline(DiffusionPipeline):
...
@@ -463,7 +463,7 @@ class StableDiffusionPix2PixZeroPipeline(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
)
...
@@ -545,7 +545,7 @@ class StableDiffusionPix2PixZeroPipeline(DiffusionPipeline):
...
@@ -545,7 +545,7 @@ class StableDiffusionPix2PixZeroPipeline(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
)
...
...
src/diffusers/pipelines/latent_consistency_models/pipeline_latent_consistency_img2img.py
View file @
c0f5346a
...
@@ -331,7 +331,7 @@ class LatentConsistencyModelImg2ImgPipeline(
...
@@ -331,7 +331,7 @@ class LatentConsistencyModelImg2ImgPipeline(
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
)
...
@@ -413,7 +413,7 @@ class LatentConsistencyModelImg2ImgPipeline(
...
@@ -413,7 +413,7 @@ class LatentConsistencyModelImg2ImgPipeline(
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/latent_consistency_models/pipeline_latent_consistency_text2img.py
View file @
c0f5346a
...
@@ -315,7 +315,7 @@ class LatentConsistencyModelPipeline(
...
@@ -315,7 +315,7 @@ class LatentConsistencyModelPipeline(
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
)
...
@@ -397,7 +397,7 @@ class LatentConsistencyModelPipeline(
...
@@ -397,7 +397,7 @@ class LatentConsistencyModelPipeline(
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/pia/pipeline_pia.py
View file @
c0f5346a
...
@@ -340,7 +340,7 @@ class PIAPipeline(
...
@@ -340,7 +340,7 @@ class PIAPipeline(
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
)
...
@@ -422,7 +422,7 @@ class PIAPipeline(
...
@@ -422,7 +422,7 @@ class PIAPipeline(
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/stable_diffusion/pipeline_stable_diffusion.py
View file @
c0f5346a
...
@@ -369,7 +369,7 @@ class StableDiffusionPipeline(
...
@@ -369,7 +369,7 @@ class StableDiffusionPipeline(
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
)
...
@@ -451,7 +451,7 @@ class StableDiffusionPipeline(
...
@@ -451,7 +451,7 @@ class StableDiffusionPipeline(
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/stable_diffusion/pipeline_stable_diffusion_depth2img.py
View file @
c0f5346a
...
@@ -242,7 +242,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline, TextualInversionLoader
...
@@ -242,7 +242,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline, TextualInversionLoader
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
)
...
@@ -324,7 +324,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline, TextualInversionLoader
...
@@ -324,7 +324,7 @@ class StableDiffusionDepth2ImgPipeline(DiffusionPipeline, TextualInversionLoader
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/stable_diffusion/pipeline_stable_diffusion_img2img.py
View file @
c0f5346a
...
@@ -415,7 +415,7 @@ class StableDiffusionImg2ImgPipeline(
...
@@ -415,7 +415,7 @@ class StableDiffusionImg2ImgPipeline(
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
)
...
@@ -497,7 +497,7 @@ class StableDiffusionImg2ImgPipeline(
...
@@ -497,7 +497,7 @@ class StableDiffusionImg2ImgPipeline(
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/stable_diffusion/pipeline_stable_diffusion_inpaint.py
View file @
c0f5346a
...
@@ -487,7 +487,7 @@ class StableDiffusionInpaintPipeline(
...
@@ -487,7 +487,7 @@ class StableDiffusionInpaintPipeline(
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
)
...
@@ -569,7 +569,7 @@ class StableDiffusionInpaintPipeline(
...
@@ -569,7 +569,7 @@ class StableDiffusionInpaintPipeline(
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/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py
View file @
c0f5346a
...
@@ -523,7 +523,7 @@ class StableDiffusionInstructPix2PixPipeline(
...
@@ -523,7 +523,7 @@ class StableDiffusionInstructPix2PixPipeline(
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
)
...
@@ -587,7 +587,7 @@ class StableDiffusionInstructPix2PixPipeline(
...
@@ -587,7 +587,7 @@ class StableDiffusionInstructPix2PixPipeline(
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/stable_diffusion/pipeline_stable_diffusion_upscale.py
View file @
c0f5346a
...
@@ -262,7 +262,7 @@ class StableDiffusionUpscalePipeline(
...
@@ -262,7 +262,7 @@ class StableDiffusionUpscalePipeline(
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
)
...
@@ -344,7 +344,7 @@ class StableDiffusionUpscalePipeline(
...
@@ -344,7 +344,7 @@ class StableDiffusionUpscalePipeline(
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/stable_diffusion/pipeline_stable_unclip.py
View file @
c0f5346a
...
@@ -359,7 +359,7 @@ class StableUnCLIPPipeline(DiffusionPipeline, TextualInversionLoaderMixin, LoraL
...
@@ -359,7 +359,7 @@ class StableUnCLIPPipeline(DiffusionPipeline, TextualInversionLoaderMixin, LoraL
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
)
...
@@ -441,7 +441,7 @@ class StableUnCLIPPipeline(DiffusionPipeline, TextualInversionLoaderMixin, LoraL
...
@@ -441,7 +441,7 @@ class StableUnCLIPPipeline(DiffusionPipeline, TextualInversionLoaderMixin, LoraL
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