LususNaturae commited on
Commit
4ce9f11
·
verified ·
1 Parent(s): 28b607e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: creativeml-openrail-m
3
+ base_model: "black-forest-labs/FLUX.1-dev"
4
+ tags:
5
+ - stable-diffusion
6
+ - stable-diffusion-diffusers
7
+ - text-to-image
8
+ - diffusers
9
+ - simpletuner
10
+ - lora
11
+ - template:sd-lora
12
+ inference: true
13
+
14
+ ---
15
+
16
+ # lora-training
17
+
18
+ This is a LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
19
+
20
+
21
+
22
+ The main validation prompt used during training was:
23
+
24
+
25
+
26
+ ```
27
+ Photograph of an Irani man riding a horse on the moon
28
+ ```
29
+
30
+ ## Validation settings
31
+ - CFG: `3.5`
32
+ - CFG Rescale: `0.0`
33
+ - Steps: `20`
34
+ - Sampler: `None`
35
+ - Seed: `42`
36
+ - Resolution: `1024`
37
+
38
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
39
+
40
+
41
+
42
+
43
+ <Gallery />
44
+
45
+ The text encoder **was not** trained.
46
+ You may reuse the base model text encoder for inference.
47
+
48
+
49
+ ## Training settings
50
+
51
+ - Training epochs: 450
52
+ - Training steps: 300
53
+ - Learning rate: 0.0001
54
+ - Effective batch size: 20
55
+ - Micro-batch size: 10
56
+ - Gradient accumulation steps: 2
57
+ - Number of GPUs: 1
58
+ - Prediction type: flow-matching
59
+ - Rescaled betas zero SNR: False
60
+ - Optimizer: AdamW, stochastic bf16
61
+ - Precision: Pure BF16
62
+ - Xformers: Not used
63
+ - LoRA Rank: 16
64
+ - LoRA Alpha: None
65
+ - LoRA Dropout: 0.1
66
+
67
+
68
+ ## Datasets
69
+
70
+ ### illuminations-flux
71
+ - Repeats: 0
72
+ - Total number of images: 16
73
+ - Total number of aspect buckets: 1
74
+ - Resolution: 512 px
75
+ - Cropped: True
76
+ - Crop style: center
77
+ - Crop aspect: square
78
+
79
+
80
+ ## Inference
81
+
82
+
83
+ ```python
84
+ import torch
85
+ from diffusers import DiffusionPipeline
86
+
87
+ model_id = 'black-forest-labs/FLUX.1-dev'
88
+ adapter_id = 'lora-training'
89
+ pipeline = DiffusionPipeline.from_pretrained(model_id)
90
+ pipeline.load_lora_weights(adapter_id)
91
+
92
+ prompt = "Photograph of an Irani man riding a horse on the moon"
93
+
94
+
95
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
96
+ image = pipeline(
97
+ prompt=prompt,
98
+ num_inference_steps=20,
99
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
100
+ width=1024,
101
+ height=1024,
102
+ guidance_scale=3.5,
103
+ ).images[0]
104
+ image.save("output.png", format="PNG")
105
+ ```
106
+