Skip to content

Commit

Permalink
fix(api): change weights filename for new models to match optimum
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Dec 24, 2023
1 parent 14208de commit ebe813d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/onnx_web/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ONNX_MODEL = "model.onnx"
ONNX_WEIGHTS = "weights.pb"
ONNX_WEIGHTS = "model.onnx_data"

LATENT_FACTOR = 8
LATENT_CHANNELS = 4
2 changes: 1 addition & 1 deletion api/onnx_web/convert/diffusion/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ def convert_diffusion_diffusers_optimum(
unet_path,
save_as_external_data=True,
all_tensors_to_one_file=True,
location="weights.pb",
location=ONNX_WEIGHTS,
)

return (True, dest_path)
4 changes: 2 additions & 2 deletions api/onnx_web/convert/diffusion/diffusion_xl.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from onnxruntime.transformers.float16 import convert_float_to_float16
from optimum.exporters.onnx import main_export

from ...constants import ONNX_MODEL
from ...constants import ONNX_MODEL, ONNX_WEIGHTS
from ..client import fetch_model
from ..utils import RESOLVE_FORMATS, ConversionContext, check_ext

Expand Down Expand Up @@ -112,7 +112,7 @@ def convert_diffusion_diffusers_xl(
unet_path,
save_as_external_data=True,
all_tensors_to_one_file=True,
location="weights.pb",
location=ONNX_WEIGHTS,
)

return (True, dest_path)

0 comments on commit ebe813d

Please sign in to comment.