Model: Fix load packets
The model_type internal reference was changed to an enum for a more extendable loading process. Return the current model type when loading a new model. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
0ab393f09c
commit
c49047eea1
1 changed files with 3 additions and 2 deletions
|
|
@ -88,14 +88,15 @@ async def load_model_gen(model_path: pathlib.Path, **kwargs):
|
||||||
try:
|
try:
|
||||||
index = 0
|
index = 0
|
||||||
async for module, modules in load_status:
|
async for module, modules in load_status:
|
||||||
|
current_model_type = model_type[index].value
|
||||||
if module == 0:
|
if module == 0:
|
||||||
loading_task = progress.add_task(
|
loading_task = progress.add_task(
|
||||||
f"[cyan]Loading {model_type[index].value} modules", total=modules
|
f"[cyan]Loading {current_model_type} modules", total=modules
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
progress.advance(loading_task)
|
progress.advance(loading_task)
|
||||||
|
|
||||||
yield module, modules, model_type
|
yield module, modules, current_model_type
|
||||||
|
|
||||||
if module == modules:
|
if module == modules:
|
||||||
# Switch to model progress if the draft model is loaded
|
# Switch to model progress if the draft model is loaded
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue