Skip to content

Commit 941ac9c

Browse files
[training-scripts] Make more examples UV-compatible (follow up on #12000) (#12407)
* make qwen and kontext uv compatible * add torchvision * add torchvision * add datasets, bitsandbytes, prodigyopt --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent 7242b5f commit 941ac9c

File tree

5 files changed

+48
-0
lines changed

5 files changed

+48
-0
lines changed

examples/advanced_diffusion_training/train_dreambooth_lora_flux_advanced.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
# "Jinja2",
2626
# "peft>=0.11.1",
2727
# "sentencepiece",
28+
# "torchvision",
29+
# "datasets",
30+
# "bitsandbytes",
31+
# "prodigyopt",
2832
# ]
2933
# ///
3034

examples/dreambooth/train_dreambooth_lora_flux.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
# "Jinja2",
2626
# "peft>=0.11.1",
2727
# "sentencepiece",
28+
# "torchvision",
29+
# "datasets",
30+
# "bitsandbytes",
31+
# "prodigyopt",
2832
# ]
2933
# ///
3034

examples/dreambooth/train_dreambooth_lora_flux_kontext.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17+
# /// script
18+
# dependencies = [
19+
# "diffusers @ git+https://github.com/huggingface/diffusers.git",
20+
# "torch>=2.0.0",
21+
# "accelerate>=0.31.0",
22+
# "transformers>=4.41.2",
23+
# "ftfy",
24+
# "tensorboard",
25+
# "Jinja2",
26+
# "peft>=0.11.1",
27+
# "sentencepiece",
28+
# "torchvision",
29+
# "datasets",
30+
# "bitsandbytes",
31+
# "prodigyopt",
32+
# ]
33+
# ///
34+
1735
import argparse
1836
import copy
1937
import itertools

examples/dreambooth/train_dreambooth_lora_qwen_image.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@
1313
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
# See the License for the specific language governing permissions and
1515

16+
# /// script
17+
# dependencies = [
18+
# "diffusers @ git+https://github.com/huggingface/diffusers.git",
19+
# "torch>=2.0.0",
20+
# "accelerate>=0.31.0",
21+
# "transformers>=4.41.2",
22+
# "ftfy",
23+
# "tensorboard",
24+
# "Jinja2",
25+
# "peft>=0.11.1",
26+
# "sentencepiece",
27+
# "torchvision",
28+
# "datasets",
29+
# "bitsandbytes",
30+
# "prodigyopt",
31+
# ]
32+
# ///
33+
1634
import argparse
1735
import copy
1836
import itertools

examples/dreambooth/train_dreambooth_lora_sana.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
# "Jinja2",
2626
# "peft>=0.14.0",
2727
# "sentencepiece",
28+
# "torchvision",
29+
# "datasets",
30+
# "bitsandbytes",
31+
# "prodigyopt",
2832
# ]
2933
# ///
3034

0 commit comments

Comments
 (0)