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
4cb887e0
Unverified
Commit
4cb887e0
authored
Dec 19, 2022
by
Anton Lozhkov
Committed by
GitHub
Dec 19, 2022
Browse files
Transformers version req for UnCLIP (#1766)
* Transformers version req for UnCLIP * add to the list
parent
9f657f10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
src/diffusers/pipelines/unclip/__init__.py
src/diffusers/pipelines/unclip/__init__.py
+12
-3
src/diffusers/utils/import_utils.py
src/diffusers/utils/import_utils.py
+1
-0
No files found.
src/diffusers/pipelines/unclip/__init__.py
View file @
4cb887e0
from
...utils
import
is_torch_available
,
is_transformers_available
from
...utils
import
(
OptionalDependencyNotAvailable
,
is_torch_available
,
is_transformers_available
,
is_transformers_version
,
)
if
is_transformers_available
()
and
is_torch_available
():
try
:
if
not
(
is_transformers_available
()
and
is_torch_available
()
and
is_transformers_version
(
">="
,
"4.25.0"
)):
raise
OptionalDependencyNotAvailable
()
except
OptionalDependencyNotAvailable
:
from
...utils.dummy_torch_and_transformers_objects
import
UnCLIPPipeline
else
:
from
.pipeline_unclip
import
UnCLIPPipeline
from
.pipeline_unclip
import
UnCLIPPipeline
from
.text_proj
import
UnCLIPTextProjModel
src/diffusers/utils/import_utils.py
View file @
4cb887e0
...
@@ -359,6 +359,7 @@ def requires_backends(obj, backends):
...
@@ -359,6 +359,7 @@ def requires_backends(obj, backends):
"VersatileDiffusionPipeline"
,
"VersatileDiffusionPipeline"
,
"VersatileDiffusionDualGuidedPipeline"
,
"VersatileDiffusionDualGuidedPipeline"
,
"StableDiffusionImageVariationPipeline"
,
"StableDiffusionImageVariationPipeline"
,
"UnCLIPPipeline"
,
]
and
is_transformers_version
(
"<"
,
"4.25.0"
):
]
and
is_transformers_version
(
"<"
,
"4.25.0"
):
raise
ImportError
(
raise
ImportError
(
f
"You need to install `transformers>=4.25` in order to use
{
name
}
:
\n
```
\n
pip install"
f
"You need to install `transformers>=4.25` in order to use
{
name
}
:
\n
```
\n
pip install"
...
...
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