This commit is contained in:
Patrick von Platen 2022-06-15 16:19:23 +02:00
parent ca9f7ac2df
commit e3c8af2618
2 changed files with 2 additions and 5 deletions

View File

@ -6,6 +6,7 @@ from .pipeline_ddpm import DDPM
try: try:
from .pipeline_glide import GLIDE from .pipeline_glide import GLIDE
except (NameError, ImportError): except (NameError, ImportError):
class GLIDE: class GLIDE:
pass pass

View File

@ -31,11 +31,7 @@ try:
from transformers.activations import ACT2FN from transformers.activations import ACT2FN
from transformers.modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling from transformers.modeling_outputs import BaseModelOutput, BaseModelOutputWithPooling
from transformers.modeling_utils import PreTrainedModel from transformers.modeling_utils import PreTrainedModel
from transformers.utils import ( from transformers.utils import ModelOutput, add_start_docstrings_to_model_forward, replace_return_docstrings
ModelOutput,
add_start_docstrings_to_model_forward,
replace_return_docstrings,
)
except: except:
print("Transformers is not installed") print("Transformers is not installed")
pass pass