Skip to content

Commit

Permalink
Fix fetchProgress is not defined issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ibelem committed Aug 12, 2024
1 parent b992d3d commit 96906d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion demos/sd-turbo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ async function readResponse(name, response) {
if (done) return;

let newLoaded = loaded + value.length;
fetchProgress = (newLoaded / contentLength) * 100;
let fetchProgress = (newLoaded / contentLength) * 100;

if(!getSafetyChecker()) {
if (name == "sd_turbo_text_encoder") {
Expand Down
2 changes: 1 addition & 1 deletion demos/segment-anything/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ async function readResponse(name, response) {
if (done) return;

let newLoaded = loaded + value.length;
fetchProgress = (newLoaded / contentLength) * 100;
let fetchProgress = (newLoaded / contentLength) * 100;

if (name.toLowerCase().indexOf("encoder") > -1) {
samEncoderFetchProgress = 0.7 * fetchProgress;
Expand Down

0 comments on commit 96906d6

Please sign in to comment.