Skip to content

Commit

Permalink
SDXL WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
dakenf committed Oct 6, 2023
1 parent 8ac657d commit 61c5509
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions js/web/lib/wasm/wasm-core-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down Expand Up @@ -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');
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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],
)

Expand Down

0 comments on commit 61c5509

Please sign in to comment.