[fix] Bring draft progress and model progress in sync with model loader (#125)
* Bring draft progress and model progress in sync with model loader * Fix formatting
This commit is contained in:
parent
a011c17488
commit
0eb8fa5d1e
1 changed files with 3 additions and 2 deletions
|
|
@ -62,14 +62,15 @@ async def load_model_gen(model_path: pathlib.Path, **kwargs):
|
|||
)
|
||||
else:
|
||||
progress.advance(loading_task)
|
||||
|
||||
yield module, modules, model_type
|
||||
|
||||
if module == modules:
|
||||
# Switch to model progress if the draft model is loaded
|
||||
if model_type == "draft":
|
||||
model_type = "model"
|
||||
else:
|
||||
progress.stop()
|
||||
|
||||
yield module, modules, model_type
|
||||
finally:
|
||||
progress.stop()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue