Skip to content

unet export to onnx issue #542

@tanayvarshney

Description

@tanayvarshney

Describe the bug

Trying to export the unet model to onnx. Used this script

.onnx file created successfully but export wasn't successful:

import onnx
onnx_model = onnx.load("model.onnx")
onnx.checker.check_model(onnx_model)

Error:

protobuf_string = model if isinstance(model, bytes) else model.SerializeToString()
ValueError: Message onnx.ModelProto exceeds maximum protobuf size of 2GB: 3439066593

Reproduction

No response

Logs

No response

System Info

Python 3.8.13
Pytorch 1.13
ONNX 1.12.0
transformers 4.22.1
diffusers 0.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions