Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diffusion tasks #827

Merged
merged 12 commits into from
Jul 18, 2024
4 changes: 1 addition & 3 deletions optimum/exporters/openvino/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,7 @@ class StoreAttr(object):
)
model.config.pad_token_id = pad_token_id

if "stable-diffusion" in task:
IlyasMoutawwakil marked this conversation as resolved.
Show resolved Hide resolved
model_type = "stable-diffusion"
elif hasattr(model.config, "export_model_type"):
if hasattr(model.config, "export_model_type"):
model_type = model.config.export_model_type.replace("_", "-")
else:
model_type = model.config.model_type.replace("_", "-")
Expand Down
2 changes: 1 addition & 1 deletion optimum/exporters/openvino/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def export(
)

if "diffusers" in str(model.__class__) and not is_diffusers_available():
raise ImportError("The pip package `diffusers` is required to export stable diffusion models to ONNX.")
raise ImportError("The package `diffusers` is required to export diffusion models to ONNX.")
IlyasMoutawwakil marked this conversation as resolved.
Show resolved Hide resolved

if stateful:
# This will be checked anyway after the model conversion, but checking it earlier will save time for a user if not suitable version is used
Expand Down
Loading