mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix for UI2 model loading not showing progress
This commit is contained in:
@@ -201,6 +201,7 @@ class LazyloadPatches:
|
|||||||
|
|
||||||
# BEGIN PATCH
|
# BEGIN PATCH
|
||||||
utils.bar = tqdm(total=len(state_dict), desc="Loading model tensors", file=utils.UIProgressBarFile(), position=1)
|
utils.bar = tqdm(total=len(state_dict), desc="Loading model tensors", file=utils.UIProgressBarFile(), position=1)
|
||||||
|
utils.koboldai_vars.total_layers = len(state_dict)
|
||||||
|
|
||||||
for param_name, param in sorted(
|
for param_name, param in sorted(
|
||||||
state_dict.items(),
|
state_dict.items(),
|
||||||
@@ -216,6 +217,7 @@ class LazyloadPatches:
|
|||||||
# Should always be true
|
# Should always be true
|
||||||
param = param.materialize(map_location="cpu")
|
param = param.materialize(map_location="cpu")
|
||||||
utils.bar.update(1)
|
utils.bar.update(1)
|
||||||
|
utils.koboldai_vars.loaded_layers += 1
|
||||||
# END PATCH
|
# END PATCH
|
||||||
|
|
||||||
# First part of the test is always true as load_state_dict_keys always contains state_dict keys.
|
# First part of the test is always true as load_state_dict_keys always contains state_dict keys.
|
||||||
|
Reference in New Issue
Block a user