Skip to content

Commit 9ae8087

Browse files
authored
Demote error log to warning for models treated as having size 0 (#6589)
## Summary Demote error log to warning for models treated as having size 0. ## Related Issues / Discussions Closes #6587 I looked into handling ESRGAN model sizes properly. They load a state_dict with a bit of an unusual nested-dict structure. Rather than figure out how to accurately calculate their size, we can just wait for #6556. ESRGAN model size handling should work properly when loaded through that pathway. ## QA Instructions Loaded an ESRGAN model, and confirmed that the warning log is at the warning level. ## Merge Plan No special instructions. ## Checklist - [x] _The PR has a short but descriptive title, suitable for a changelog_ - [x] _Tests added / updated (if applicable)_ - [x] _Documentation added / updated (if applicable)_
2 parents bdf4fcd + af63c53 commit 9ae8087

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

invokeai/backend/model_manager/load/model_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def calc_model_size_by_data(logger: logging.Logger, model: AnyModel) -> int:
3838
else:
3939
# TODO(ryand): Promote this from a log to an exception once we are confident that we are handling all of the
4040
# supported model types.
41-
logger.error(
41+
logger.warning(
4242
f"Failed to calculate model size for unexpected model type: {type(model)}. The model will be treated as "
4343
"having size 0."
4444
)

0 commit comments

Comments
 (0)