Closed
Description
Describe the bug
Across several files, a bool statement is wrongly constructed IMO
One example:
=> instead of checking for truthiness of the function objectis_accelerate_available
itself, it should check for the truthiness of its return value I believe. So parentheses are needed, to call this function.
Proposed fix:
CTX = init_empty_weights if is_accelerate_available() else nullcontext
Reproduction
see
Logs
No response
System Info
not relevant