Commit Graph

75 Commits (master)

Author SHA1 Message Date
bmaltais b48c86cbff
python3.11 support
The script will now detect and utilize Python 3.11 alongside Python 3.10.

Here are the key changes:
- I added a function to detect the available Python command, prioritizing python3.11, then python3.10, then python3.
- I modified virtual environment creation to use the detected Python version.
- I updated macOS Homebrew installation logic to check for python@3.11 and python-tk@3.11 first.
- I made Python-version-specific paths (e.g., for site-packages and symlinks, especially in Runpod environments) dynamic to adapt to the selected Python version.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-06-20 07:30:38 -04:00
bmaltais d85ae6bdb5
It looks like the setup.sh and gui.sh scripts were incorrectly defaulting to ROCm package installation if `rocminfo` was present, even on systems with NVIDIA GPUs. (#3293)
I've modified both scripts to check for `nvidia-smi` first. If `nvidia-smi` is found, the scripts will now use the NVIDIA-specific (CUDA) requirements files, regardless of the presence of `rocminfo`. The ROCm check is now a fallback if `nvidia-smi` is not detected.

This should ensure that you get the correct PyTorch build and dependencies if you have an NVIDIA GPU, resolving the issue where ROCm packages were being erroneously selected.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2025-06-18 19:52:40 -04:00
Disty0 1538a51e68 Cleanup 2025-06-13 20:31:42 +03:00
Disty0 df35d93289 Update IPEX and ROCm 2025-06-13 20:17:05 +03:00
Thanarit 46a21899da Add support for already activated conda environment setup 2025-06-06 00:14:22 +07:00
bmaltais ed55e81997
v25.0.0 release (#3138)
* Add support for custom learning rate scheduler type to the GUI

* Add .webp image extension support to BLIP2 captioning.

* Check for --debug flag for gui command-line args at startup

* Validate GPU ID accelerate input and return error when needed

* Update to latest sd-scripts dev commit

* Fix issue with pip upgrade

* Remove confusing log after command execution.

* piecewise_constant scheduler

* Update to latest sd-scripts dev commit

* fix: fixed docker-compose for passing models via volumes

* Prevent providing the legacy learning_rate if unet or te learning rate is provided

* Fix toml noise offset parameters based on selected type

* Fix adaptive_noise_scale value not properly loading from json config

* Fix prompt.txt location

* Improve "print command" output format

* Use output model name as wandb run name if not provided

* Update sd-scripts dev release

* Bump crate-ci/typos from 1.21.0 to 1.22.9

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.21.0 to 1.22.9.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.21.0...v1.22.9)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump docker/build-push-action from 5 to 6

Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Get latest sd3 code

* Adding SD3 GUI elements

* Fix interactivity

* MVP GUI for SD3

* Fix text encoder issue

* Add fork section to readme

* Update sd3 commit

* Merge security-fix

* Update sc-script to latest code

* Auto-detect model type for safetensors files

Automatically tick the checkboxes for v2 and SDXL on the common training UI
and LoRA extract/merge utilities.

* autodetect-modeltype: remove unused lambda inputs

* rework TE1/TE2 learning rate handling for SDXL dreambooth

SDXL dreambooth apparently trains without the text encoders by default,
requiring the `--train_text_encoder` flag to be passed so that the
learning rates for TE1/TE2 are recognized.

The toml handling now permits 0 to be passed as a learning rate in
order to disable training of one or both text encoders.
This behavior aligns with the description given on the GUI.

TE1/TE2 learning rate parameters can be left blank on the GUI to
not pass a value to the training script.

* dreambooth_gui: fix toml value filtering condition

In python3, `0 == False` will evaluate True.
That can cause arg values of 0 to be wrongly eliminated from the toml output.
The conditional must check the type when comparing for False.

* autodetect-modeltype: also do the v2 checkbox in extract_lora

* Update to latest dev branch code

* bring back SDXLConfig accordion for dreambooth gui (#2694)

b-fission <b-fission@users.noreply.github.com>

* Update to latest sd3 branch commit

* Fix merge issue

* Update gradio version

* Update to latest flux.1 code

* Add Flux.1 Model checkbox and detection

* Adding LoRA type "Flux1" to dropdown

* Added Flux.1 parameters to GUI

* Update sd-scripts and requirements

* Add missing Flux.1 GUI parameters

* Update to latest sd-scripts sd3 code

* Fix issue with cache_text_encoder_outputs

* Update to latest sd-scripts flux1 code

* Adding new flux.1 options to GUI

* Update to latest sd-scripts version of flux.1

* Adding guidance_scale option

* Update to latest sd3 flux.1 sd-scripts

* Add dreambooth and finetuning support for flux.1

* Update README

* Fix t5xxl path issue in DB

* add missing fp8_base parameter

* Fix issue with guidance scale not being passed as float for values like 1

* Temporary fir for blockwise_fused_optimizers

* Update to latest sd-scripts Flux.1 code

* Fix blockwise_fused_optimizers typo

* Add mem_eff_save option to GUI for Flux.1

* Added support for Flux.1 LoRA Merge

* Update to latest sd-scripts sd3 branch code

* Add diffusers option to flux.1 merge LoRA utility

* Fix issue with split_mode and train_blocks

* Updating requirements

* Add flux_fused_backward_pass to dreambooth and finetuning

* Update requirements_linux_docker.txt

update accelerate version for linux_docker

* Update to latest sd3 flux code

* Add extract flux lora GUI

* MErged latest sd3 branch code

* Add support for split_qkv

* Add missing network argument for split_qkv

* Add timestep_sampling shift support

* Update to latest sd-scripts flux.1 code

* Add support for fp8_base_unet

* Update requirements as per sd-scripts suggestion

* Upgrade to cu124

* Update IPEX and ROCm

* Fix issue with balancing when folder with name already exist

* Update sd-scripts

* Removed unsupported parameters from flux lora network

* Bump crate-ci/typos from 1.23.6 to 1.24.3

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to 1.24.3.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.6...v1.24.3)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update sd-scripts code

* Adding flux_shift option to timestep_sampling

* Update sd-scripts release

* Add support for Train T5-XXL

* Update sd-scripts submodule

* Add support for cpu_offload_checkpointing to GUI

* Force t5xxl_max_token_length  to be served as an integer

* Fix typo for flux_shift

* Update to latest sd-scripts code

* Grouping lora parameters

* Validate if lora type is Flux1 when flux1_checkbox is true

* Improve visual sectioning of parameters for lora

* Add dark mode styles

* Missed one color

* Update sd-scripts and add support for t5xxl LR

* Update transformers and wandb module

* Fix issue with new text_encoder_lr parameter syntax

* Add support for lr_warmup_steps override

* Update lr_warmup_steps code

* Removing stable-diffusion-1.5 default model

* Fix for max_train_steps

* Revert some changes

* Preliminary support for Flux1 OFT

* Fix logic typo

* Update sd-scripts

* Add support for Rank for layers

* Update lora_gui.py

Fixed minor typos of "Regularization"

* Update dreambooth_gui.py

Fixed minor typos of "Regularization"

* Update textual_inversion_gui.py

Fixed minor typos of "Regularization"

* Add support for Blocks to train

* Add missing network parms

* Fix issue with old_lr_warmup_steps

* Update sd-scripts

* Add support for ScheduleFree Optimizer Type

* Update sd-scripts

* Update requirements_pytorch_windows.txt

* Update requirements_pytorch_windows.txt

* Update sd-scripts from origin

* Another sd-script update

* Adding support for blocks_to_swap option to gui

* Fix xformers install issue

* feat(docker): mount models folder as a volume

* feat(docker): add models folder to .dockerignore

* Add support for AdEMAMix8bit optimizer

* Bump crate-ci/typos from 1.23.6 to 1.25.0

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to 1.25.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.6...v1.25.0)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix typo on README.md

* Add new --noverify option to skip requirements validation on startup

* Update startup GUI code

* Update setup code

* Update sd-scripts

* Update sf-scripts

* Update Lycoris support

* Allow to specify tensorboard host via env var TENSORBOARD_HOST

* Update sd-scripts version

* Update sd-scripts release

* Update sd-scripts

* Add --skip_cache_check option to GUI

* Fix requirements issue

* Add support for LyCORIS LoRA when training Flux.1

* Pin huggingface-hub version for gradio 5

* Update sd-scripts

* Add support for --save_last_n_epochs_state

* Update sd-scripts to version with Differential Output Preservation

* Increase maximum flux-lora merge strength to 2

* Update to latest sd-scripts

* Update requirements syntax (for windows)

* Update requirements for linux

* Update torch version and validation output

* Fix typo

* Update README

* Fix validation issue on linux

* Update sd-scripts, improve requirements outputs

* Update requirements_runpod.txt

* Update requirements for onnxruntime-gpu

Needed for compatibility with CUDA 12.

* Update onnxruntime-gpu==1.19.2

* Update sd-scripts release

* Add support for save_last_n_epochs

* Update sd-scripts

* Bump crate-ci/typos from 1.23.6 to 1.26.8 (#2940)

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to 1.26.8.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.6...v1.26.8)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bmaltais <bernard@ducourier.com>

* fix 'cached_download' from 'huggingface_hub' (#2947)

Describe the bug: cannot import name 'cached_download' from 'huggingface_hub'

It's applyed for all platforms

Co-authored-by: bmaltais <bernard@ducourier.com>

* Add support for quiet output for linux setup

* Fix quiet issue

* Update sd-scripts

* Update sd-scripts with blocks_to_swap support

* Make blocks_to_swap visible in LoRA tab

* Fix blocks_to_swap not properly working

* Update sd-scripts and allow python 3.10 to 3.12

* Fix issue with max_train_steps

* Fix max_train_steps_info error

* Reverting all changes for max_train_steps

* Update sd-scripts

* Update sd-scripts

* Update to latest sd-scripts

* Add support for RAdamScheduleFree

* Add support for huber_scale

* Add support for fused_backward_pass for sd3 finetuning

* Add support for prodigyplus.ProdigyPlusScheduleFree

* SD3 LoRA training MVP

* Make blocks_to_swap common

* Add support for sd3 lora disable_mmap_load_safetensors

* Add a bunch of missing SD3 parameters

* Fix clip_l issue for missing path

* Fix train_t5xxl issue

* Fix network_module issue

* Add uniform to weighting_scheme

* Bump crate-ci/typos from 1.23.6 to 1.28.1 (#2996)

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to 1.28.1.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.6...v1.28.1)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bmaltais <bernard@ducourier.com>

* Update README.md (#3031)

* Bump crate-ci/typos from 1.23.6 to 1.29.0 (#3029)

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to 1.29.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.6...v1.29.0)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bmaltais <bernard@ducourier.com>

* Update sd-scripts version

* Update setup.sh (#3054)

Enter the current directory before executing setup.sh, otherwise the installer might failed to find rqeuirements.txt

* Removing wrong folder

* Fix issue with SD3 Lora training blocks_to_swap and fused_backward_pass

* Fix dreambooth issue

* Update to lastest sd-scripts code

* Run on novita (#3119) (#3120)

* add run on novita

* adjust position

Co-authored-by: hugo <liyiligang@users.noreply.github.com>

* Bump crate-ci/typos from 1.23.6 to 1.30.0 (#3101)

Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.23.6 to 1.30.0.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.23.6...v1.30.0)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bmaltais <bernard@ducourier.com>

* updated prodigyopt to 1.1.2 and removed duplicated row in requirements.txt (#3065)

* fixed names on LR Schedure dropdown (#3064)

* Update to latest sd-scripts version

* fixed names on LR Schedure dropdown (#3064)

* Cleanup venv3

* Fix issue with gradio on new installations
Add support for latest sd-scripts pytorch-optimizer

* Update README for v25.0.0 release

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: b-fission <b-fission@users.noreply.github.com>
Co-authored-by: DevArqSangoi <lucas.sangoi@gmail.com>
Co-authored-by: Кирилл Москвин <retreat.cost@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: b-fission <131207849+b-fission@users.noreply.github.com>
Co-authored-by: eftSharptooth <76253264+eftSharptooth@users.noreply.github.com>
Co-authored-by: Disty0 <disty@disty.xyz>
Co-authored-by: wcole3 <will.cole3@gmail.com>
Co-authored-by: rohitanshu <85547195+iamrohitanshu@users.noreply.github.com>
Co-authored-by: wzgrx <39661556+wzgrx@users.noreply.github.com>
Co-authored-by: Vladimir Sotnikov <vladimir.s@alphakek.ai>
Co-authored-by: bulieme0 <53142287+bulieme@users.noreply.github.com>
Co-authored-by: Nicolas Pereira <41456803+hqnicolas@users.noreply.github.com>
Co-authored-by: ruucm <ruucm.a@gmail.com>
Co-authored-by: CaledoniaProject <CaledoniaProject@users.noreply.github.com>
Co-authored-by: hugo <liyiligang@users.noreply.github.com>
Co-authored-by: Koro <Koronos@users.noreply.github.com>
2025-03-28 11:00:44 -04:00
Disty0 082adb9e65 Autodetect for ROCm 2024-04-09 16:55:23 +03:00
Disty0 5d4c4486f9
AMD ROCm installer (#2167)
* ROCm installer

* Update requirements_linux_rocm.txt
2024-03-27 17:48:05 -04:00
bmaltais b27d0694c4 Improve setup. Add --headless option 2024-03-12 20:31:22 -04:00
Bernard Maltais 1b0a679833 Fix typo in setup.sh 2024-03-10 19:24:44 -04:00
Bernard Maltais 8e61677b7f Install missing packaging module 2024-03-10 19:20:57 -04:00
Disty0 ef7bf311bd Initial Intel ARC support with IPEX 2023-09-07 22:40:29 +03:00
bmaltais b7c9bcd6b7 Update runpod 2023-06-24 20:07:00 -04:00
bmaltais b3e8e9537f Updates for runpod 2023-06-24 19:51:40 -04:00
bmaltais bae308a313 Fix for runpod 2023-06-24 19:49:20 -04:00
bmaltais 40108a3786 Runpod updated 2023-06-24 19:38:52 -04:00
bmaltais 183c4c4d64 More runpod updates 2023-06-23 17:31:13 -04:00
bmaltais 1f67b89682 More runpopd updates 2023-06-23 17:22:51 -04:00
bmaltais 727c1858e6 Updates to automate runpos requirements install 2023-06-23 17:02:10 -04:00
bmaltais 89c79c4110 Add runpod support 2023-06-23 16:43:08 -04:00
bmaltais 59ca38d2b3
Improve setup solution (#1043)
Improve setup across platforms
2023-06-23 11:56:13 -04:00
bmaltais 31d04983c1 Fix linux setup detection 2023-06-22 20:15:54 -04:00
bmaltais 551eed76d2
Refactor setup (#1030)
* Refactor setup in setup folder

* More refactoring

* Remove need to run setup.sh as sudo

* Fix for unix undel python 3.8

* Create setup_common.py

* Fix windows setup

* Refining setup

---------

Co-authored-by: Your Name <you@example.com>
2023-06-21 15:09:18 -04:00
bmaltais 3d66d35c39 Updates to support ubuntu 22.04 on wsl2 2023-06-14 18:21:42 -04:00
bmaltais 797e2b4433 Update unix based system requirements file 2023-06-07 13:38:12 -04:00
YaoJunchang bf53d0f1e6 fix: use python 3.10 prior to avoid use python higher than 3.10 mistakenly 2023-04-27 18:43:10 +08:00
JSTayco 77e762ab9c Update VENV directory to be more dynamic in docker 2023-04-03 11:03:18 -07:00
JSTayco 4836cc35de Improve container environment detection
Improve container environment detection, improve library linking in containers, ensure we exit after calling gui.sh to avoid any conditions where code continues running.
2023-04-02 22:40:48 -07:00
JSTayco fd603cb5a7 Add -u short option 2023-04-02 21:56:09 -07:00
JSTayco 0d4cacb60f Add option -u to skip gui launch 2023-04-02 21:53:19 -07:00
JSTayco a59fdbcd59 Typo fixes
Makes the SAST happy.
2023-04-02 12:35:47 -07:00
JSTayco f32ce0aead Removed tensorflow from requirements.txt for macOS
Added CPU architecture detection for packages
2023-04-02 12:32:56 -07:00
JSTayco 1875bccab8 Typo fix preventing Linux pip install 2023-04-01 18:51:24 -07:00
bmaltais 109907c6f3 Update setup file 2023-04-01 16:28:05 -04:00
bmaltais 7150179155 Update missing setup files 2023-04-01 16:22:30 -04:00
JSTayco 2c470c6659 Typo fixes 2023-04-01 10:37:20 -07:00
JSTayco 14dc16ccd4 Minor fix to branch name 2023-04-01 10:18:44 -07:00
JSTayco 69deea0979 Fix auto branch switch 2023-04-01 10:17:36 -07:00
JSTayco 0dbbaf5891 Keep current branch unless specified otherwise 2023-04-01 10:15:15 -07:00
JSTayco ab6c7e2082 Fixed git cloning for new directories. 2023-04-01 09:59:35 -07:00
JSTayco 882e4837b3 Check for valid install directory and upgrade pip in venv 2023-04-01 09:15:07 -07:00
JSTayco aed9f937da Removed -v test as older versions of bash don't support that option
Made script compatible with very old version of bash, added some guards for library linking, and removed redundant library linking.
2023-04-01 08:52:45 -07:00
JSTayco b2e7d5f419 Minor help text formatting. 2023-03-31 21:38:27 -07:00
JSTayco c92153e546 Hide pip output better with no verbosity 2023-03-31 21:21:50 -07:00
JSTayco 2a24a8b6fc Update setup.sh 2023-03-31 21:11:24 -07:00
JSTayco a740fdb006 Update setup.sh 2023-03-31 21:09:43 -07:00
JSTayco fbf6709946 More safeties around git
And more error messages in verbose mode
2023-03-31 21:03:25 -07:00
JSTayco 4559528d33 git is now location indpendent
removed all cd commands in process
2023-03-31 20:54:21 -07:00
JSTayco 035dad220a git is now location independent
Removed the cd commands in the process
2023-03-31 20:51:49 -07:00
JSTayco febd553864 Python is now more dynamic
Made python and the requirements.txt location independent.
2023-03-31 20:00:56 -07:00