diff --git a/js/web/lib/wasm/wasm-core-impl.ts b/js/web/lib/wasm/wasm-core-impl.ts index 36328d5f7e459..9cf2d75f318d6 100644 --- a/js/web/lib/wasm/wasm-core-impl.ts +++ b/js/web/lib/wasm/wasm-core-impl.ts @@ -79,8 +79,8 @@ export const createSessionAllocate = (model: Uint8Array, weights?: ArrayBuffer): let weightsFile: FSNode|undefined; if (weights) { - weightsFile = wasm.FS.create('/home/web_user/weights.pb'); - weightsFile.contents = new Uint8Array(weights); + weightsFile = wasm.FS.create('/home/web_user/model.onnx.data'); + weightsFile.contents = weights; weightsFile.usedBytes = weights.byteLength; wasm.FS.chdir('/home/web_user'); } @@ -149,7 +149,7 @@ export const createSessionFinalize = } allocs.forEach(alloc => wasm._free(alloc)); if (modelData[2]) { - wasm.FS.unlink('/home/web_user/weights.pb'); + wasm.FS.unlink('/home/web_user/model.onnx.data'); } } }; diff --git a/onnxruntime/python/tools/transformers/models/stable_diffusion/optimize_pipeline.py b/onnxruntime/python/tools/transformers/models/stable_diffusion/optimize_pipeline.py index a8e3c69332339..b3691cf288773 100644 --- a/onnxruntime/python/tools/transformers/models/stable_diffusion/optimize_pipeline.py +++ b/onnxruntime/python/tools/transformers/models/stable_diffusion/optimize_pipeline.py @@ -146,7 +146,7 @@ def optimize_sd_pipeline( logger.info("Convert %s to float16 ...", name) op_block_list = ["RandomNormalLike"] m.convert_float_to_float16( - keep_io_types=False, + keep_io_types=True, op_block_list=op_block_list + force_fp32_operators[name], )