Nerogar / OneTrainer

OneTrainer is a one-stop solution for all your stable diffusion training needs.
GNU Affero General Public License v3.0
1.81k stars 154 forks source link

[Bug]: Mac/Linux/non-CUDA support has been broken #516

Closed orcinus closed 1 month ago

orcinus commented 1 month ago

What happened?

OneTrainer/modules/util/quantization_util.py explicitly imports bitsandbytes, no checks, no requirements, no nothing. This will fail on startup on pretty much anything that's not Windows running CUDA.

What did you expect would happen?

All other code seems to only require bnb as needed, not as an explicit, static import. This seems to have been done as part of recently introduced Flux support.

Relevant log output

No response

Output of pip freeze

No response

Nerogar commented 1 month ago

Please update and check if this is still an issue. I've added a tra/catch around the bitsandbytes import

orcinus commented 1 month ago

Works! Thanks!