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 153 forks source link

Explicitly ignore unwanted Conda channels, improve version check & docs #519

Closed Arcitec closed 1 month ago

Arcitec commented 1 month ago
Arcitec commented 1 month ago

This change almost fully gets rid of the "deprecation" spam in recent Conda versions, where anyone relying on the implicit "defaults" channel gets flooded with this ugly/"worrying" message:

"FutureWarning: Adding 'defaults' to the channel list implicitly is deprecated and will be removed in 25.3. To remove this warning, please choose a default channel explicitly via 'conda config --add channels name', e.g. 'conda config --add channels defaults'."

It still shows up one time at the end of the "conda create" command, since Conda always notifies users at least once about this upcoming change (since they want to give users a chance to manually change their global Conda config to add "defaults" if they still need it). But at least our users won't be flooded with this message during OneTrainer's install anymore.

As for the installation itself - nothing is changed compared to the old code. It still only uses conda-forge as its installation source. We are now just even more explicit about it. The past code allowed fallback to "defaults" if conda-forge lacked a package. Now we don't. But either way, all packages we install via Conda always existed in conda-forge. Our actual requirements.txt is handled separately, via pip inside conda.

I also raised the Python version check, since it was silly that we allowed anything as old as "Python 3.0.0" to pass the version check. That wide range was inherited from the oldest launch scripts, and I just forgot to improve the range check.


Here's an example of the spam that the PR fixes:

image

Arcitec commented 1 month ago

Force-pushed a documentation improvement too, since you prefer combining commits. It's ready.