markury commited on
Commit
2e11e5a
1 Parent(s): 476734f

Model card auto-generated by SimpleTuner

Browse files
Files changed (1) hide show
  1. README.md +148 -0
README.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ widget:
14
+ - text: 'unconditional (blank prompt)'
15
+ parameters:
16
+ negative_prompt: ''''
17
+ output:
18
+ url: ./assets/image_0_0.png
19
+ - text: 'a photo of Jesse Pinkman'
20
+ parameters:
21
+ negative_prompt: ''''
22
+ output:
23
+ url: ./assets/image_1_0.png
24
+ - text: 'a photo of Walter White'
25
+ parameters:
26
+ negative_prompt: ''''
27
+ output:
28
+ url: ./assets/image_2_0.png
29
+ - text: 'a photo of Jesse Pinkman and Walter White'
30
+ parameters:
31
+ negative_prompt: ''''
32
+ output:
33
+ url: ./assets/image_3_0.png
34
+ - text: 'a photograph of Walter White and Jesse Pinkman'
35
+ parameters:
36
+ negative_prompt: ''''
37
+ output:
38
+ url: ./assets/image_4_0.png
39
+ ---
40
+
41
+ # breaking-bad-flux
42
+
43
+ This is a LoRA derived from [black-forest-labs/FLUX.1-dev](https://huggingface.co/black-forest-labs/FLUX.1-dev).
44
+
45
+
46
+
47
+ The main validation prompt used during training was:
48
+
49
+
50
+
51
+ ```
52
+ a photograph of Walter White and Jesse Pinkman
53
+ ```
54
+
55
+ ## Validation settings
56
+ - CFG: `3.5`
57
+ - CFG Rescale: `0.0`
58
+ - Steps: `28`
59
+ - Sampler: `None`
60
+ - Seed: `420`
61
+ - Resolution: `1024x1024`
62
+
63
+ Note: The validation settings are not necessarily the same as the [training settings](#training-settings).
64
+
65
+ You can find some example images in the following gallery:
66
+
67
+
68
+ <Gallery />
69
+
70
+ The text encoder **was not** trained.
71
+ You may reuse the base model text encoder for inference.
72
+
73
+
74
+ ## Training settings
75
+
76
+ - Training epochs: 29
77
+ - Training steps: 500
78
+ - Learning rate: 0.0001
79
+ - Effective batch size: 2
80
+ - Micro-batch size: 1
81
+ - Gradient accumulation steps: 2
82
+ - Number of GPUs: 1
83
+ - Prediction type: flow-matching
84
+ - Rescaled betas zero SNR: False
85
+ - Optimizer: AdamW, stochastic bf16
86
+ - Precision: Pure BF16
87
+ - Xformers: Not used
88
+ - LoRA Rank: 16
89
+ - LoRA Alpha: None
90
+ - LoRA Dropout: 0.1
91
+ - LoRA initialisation style: default
92
+
93
+
94
+ ## Datasets
95
+
96
+ ### jesse
97
+ - Repeats: 0
98
+ - Total number of images: 12
99
+ - Total number of aspect buckets: 1
100
+ - Resolution: 512 px
101
+ - Cropped: False
102
+ - Crop style: None
103
+ - Crop aspect: None
104
+ ### walter
105
+ - Repeats: 1
106
+ - Total number of images: 8
107
+ - Total number of aspect buckets: 1
108
+ - Resolution: 512 px
109
+ - Cropped: False
110
+ - Crop style: None
111
+ - Crop aspect: None
112
+ ### both
113
+ - Repeats: 2
114
+ - Total number of images: 2
115
+ - Total number of aspect buckets: 1
116
+ - Resolution: 512 px
117
+ - Cropped: False
118
+ - Crop style: None
119
+ - Crop aspect: None
120
+
121
+
122
+ ## Inference
123
+
124
+
125
+ ```python
126
+ import torch
127
+ from diffusers import DiffusionPipeline
128
+
129
+ model_id = 'black-forest-labs/FLUX.1-dev'
130
+ adapter_id = 'markury/breaking-bad-flux'
131
+ pipeline = DiffusionPipeline.from_pretrained(model_id)
132
+ pipeline.load_lora_weights(adapter_id)
133
+
134
+ prompt = "a photograph of Walter White and Jesse Pinkman"
135
+
136
+
137
+ pipeline.to('cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu')
138
+ image = pipeline(
139
+ prompt=prompt,
140
+ num_inference_steps=28,
141
+ generator=torch.Generator(device='cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu').manual_seed(1641421826),
142
+ width=1024,
143
+ height=1024,
144
+ guidance_scale=3.5,
145
+ ).images[0]
146
+ image.save("output.png", format="PNG")
147
+ ```
148
+