From 78ef1761d7c951009209d5ed712de2057e0bcdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Fri, 29 Aug 2025 21:28:04 +0200 Subject: [PATCH 1/2] Add script header with dependencies Added a script header with dependencies for the training script. --- .../dreambooth/train_dreambooth_lora_qwen_image.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/examples/dreambooth/train_dreambooth_lora_qwen_image.py b/examples/dreambooth/train_dreambooth_lora_qwen_image.py index feec4da712f3..b53de3993c2f 100644 --- a/examples/dreambooth/train_dreambooth_lora_qwen_image.py +++ b/examples/dreambooth/train_dreambooth_lora_qwen_image.py @@ -13,6 +13,20 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and +# /// script +# dependencies = [ +# "diffusers @ git+https://github.com/huggingface/diffusers.git", +# "torch>=2.0.0", +# "accelerate>=0.31.0", +# "transformers>=4.41.2", +# "ftfy", +# "tensorboard", +# "Jinja2", +# "peft>=0.11.1", +# "sentencepiece", +# ] +# /// + import argparse import copy import itertools From 4b4ff44bedd1209fca2bbb6738b1652f132651a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Fri, 29 Aug 2025 21:33:40 +0200 Subject: [PATCH 2/2] add bitsandbytes and datasets --- examples/dreambooth/train_dreambooth_lora_qwen_image.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/dreambooth/train_dreambooth_lora_qwen_image.py b/examples/dreambooth/train_dreambooth_lora_qwen_image.py index b53de3993c2f..10ab55953ee3 100644 --- a/examples/dreambooth/train_dreambooth_lora_qwen_image.py +++ b/examples/dreambooth/train_dreambooth_lora_qwen_image.py @@ -24,6 +24,8 @@ # "Jinja2", # "peft>=0.11.1", # "sentencepiece", +# "bitsandbytes", +# "datasets" # ] # ///