sayakpaul HF staff commited on
Commit
dfd426c
·
verified ·
1 Parent(s): ab9565b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -48
README.md CHANGED
@@ -22,39 +22,6 @@ These are the control weights trained on [black-forest-labs/FLUX.1-dev](htpss://
22
  and [TIGER-Lab/OmniEdit-Filtered-1.2M](https://huggingface.co/datasets/TIGER-Lab/OmniEdit-Filtered-1.2M) for image editing. We use the
23
  [Flux Control framework](https://blackforestlabs.ai/flux-1-tools/) for fine-tuning.
24
 
25
- prompt: Give this the look of a traditional Japanese woodblock print.
26
- ![images_0)](./images_0.png)
27
- prompt: Give this the look of a traditional Japanese woodblock print.
28
- ![images_1)](./images_1.png)
29
- prompt: Give this the look of a traditional Japanese woodblock print.
30
- ![images_2)](./images_2.png)
31
- prompt: Give this the look of a traditional Japanese woodblock print.
32
- ![images_3)](./images_3.png)
33
- prompt: transform the setting to a winter scene
34
- ![images_4)](./images_4.png)
35
- prompt: transform the setting to a winter scene
36
- ![images_5)](./images_5.png)
37
- prompt: transform the setting to a winter scene
38
- ![images_6)](./images_6.png)
39
- prompt: transform the setting to a winter scene
40
- ![images_7)](./images_7.png)
41
- prompt: Change it to look like it's in the style of an impasto painting.
42
- ![images_8)](./images_8.png)
43
- prompt: Change it to look like it's in the style of an impasto painting.
44
- ![images_9)](./images_9.png)
45
- prompt: Change it to look like it's in the style of an impasto painting.
46
- ![images_10)](./images_10.png)
47
- prompt: Change it to look like it's in the style of an impasto painting.
48
- ![images_11)](./images_11.png)
49
- prompt: turn the color of mushroom to gray
50
- ![images_12)](./images_12.png)
51
- prompt: turn the color of mushroom to gray
52
- ![images_13)](./images_13.png)
53
- prompt: turn the color of mushroom to gray
54
- ![images_14)](./images_14.png)
55
- prompt: turn the color of mushroom to gray
56
- ![images_15)](./images_15.png)
57
-
58
 
59
  ## License
60
 
@@ -110,15 +77,15 @@ import torch
110
 
111
  path = "sayakpaul/FLUX.1-dev-edit-v0" # to change
112
  edit_transformer = FluxTransformer2DModel.from_pretrained(path, torch_dtype=torch.bfloat16)
113
- control_pipe = FluxControlPipeline.from_pretrained(
114
  "black-forest-labs/FLUX.1-dev", transformer=edit_transformer, torch_dtype=torch.bfloat16
115
  ).to("cuda")
116
 
117
  # load the turbo LoRA
118
- control_pipe.load_lora_weights(
119
  hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"), adapter_name="hyper-sd"
120
  )
121
- control_pipe.set_adapters(["hyper-sd"], adapter_weights=[0.125])
122
 
123
  image = load_image("./assets/mushroom.jpg") # resize as needed.
124
  print(image.size)
@@ -185,30 +152,30 @@ You can also choose to perform quantization if the memory requirements cannot be
185
  <img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/assets/car.jpg" alt="Source Image 1" width="150"><br>
186
  <em>Give this the look of a traditional Japanese woodblock print.</em>
187
  </td>
188
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-10_car.jpg" alt="Edited Image gs 10" width="150"></td>
189
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-20_car.jpg" alt="Edited Image gs 20" width="150"></td>
190
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-30_car.jpg" alt="Edited Image gs 30" width="150"></td>
191
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-40_car.jpg" alt="Edited Image gs 40" width="150"></td>
192
  </tr>
193
  <tr>
194
  <td align="center">
195
  <img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/assets/green_creature" alt="Source Image 2" width="150"><br>
196
  <em>transform the setting to a winter scene</em>
197
  </td>
198
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-10_green_creature.jpg" alt="Edited Image gs 10" width="150"></td>
199
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-20_green_creature.jpg" alt="Edited Image gs 20" width="150"></td>
200
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-30_green_creature.jpg" alt="Edited Image gs 30" width="150"></td>
201
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-40_green_creature.jpg" alt="Edited Image gs 40" width="150"></td>
202
  </tr>
203
  <tr>
204
  <td align="center">
205
  <img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/assets/mushroom.jpg" alt="Source Image 3" width="150"><br>
206
  <em>turn the color of mushroom to gray</em>
207
  </td>
208
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-10_mushroom.jpg" alt="Edited Image gs 10" width="150"></td>
209
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-20_mushroom.jpg" alt="Edited Image gs 20" width="150"></td>
210
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-30_mushroom.jpg" alt="Edited Image gs 30" width="150"></td>
211
- <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-40_mushroom.jpg" alt="Edited Image gs 40" width="150"></td>
212
  </tr>
213
  </table>
214
 
 
22
  and [TIGER-Lab/OmniEdit-Filtered-1.2M](https://huggingface.co/datasets/TIGER-Lab/OmniEdit-Filtered-1.2M) for image editing. We use the
23
  [Flux Control framework](https://blackforestlabs.ai/flux-1-tools/) for fine-tuning.
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ## License
27
 
 
77
 
78
  path = "sayakpaul/FLUX.1-dev-edit-v0" # to change
79
  edit_transformer = FluxTransformer2DModel.from_pretrained(path, torch_dtype=torch.bfloat16)
80
+ pipeline = FluxControlPipeline.from_pretrained(
81
  "black-forest-labs/FLUX.1-dev", transformer=edit_transformer, torch_dtype=torch.bfloat16
82
  ).to("cuda")
83
 
84
  # load the turbo LoRA
85
+ pipeline.load_lora_weights(
86
  hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"), adapter_name="hyper-sd"
87
  )
88
+ pipeline.set_adapters(["hyper-sd"], adapter_weights=[0.125])
89
 
90
  image = load_image("./assets/mushroom.jpg") # resize as needed.
91
  print(image.size)
 
152
  <img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/assets/car.jpg" alt="Source Image 1" width="150"><br>
153
  <em>Give this the look of a traditional Japanese woodblock print.</em>
154
  </td>
155
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-10_car.jpg" alt="Edited Image gs 10"></td>
156
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-20_car.jpg" alt="Edited Image gs 20"></td>
157
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-30_car.jpg" alt="Edited Image gs 30"></td>
158
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-40_car.jpg" alt="Edited Image gs 40"></td>
159
  </tr>
160
  <tr>
161
  <td align="center">
162
  <img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/assets/green_creature" alt="Source Image 2" width="150"><br>
163
  <em>transform the setting to a winter scene</em>
164
  </td>
165
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-10_green_creature.jpg" alt="Edited Image gs 10"></td>
166
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-20_green_creature.jpg" alt="Edited Image gs 20"></td>
167
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-30_green_creature.jpg" alt="Edited Image gs 30"></td>
168
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-40_green_creature.jpg" alt="Edited Image gs 40"></td>
169
  </tr>
170
  <tr>
171
  <td align="center">
172
  <img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/assets/mushroom.jpg" alt="Source Image 3" width="150"><br>
173
  <em>turn the color of mushroom to gray</em>
174
  </td>
175
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-10_mushroom.jpg" alt="Edited Image gs 10"></td>
176
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-20_mushroom.jpg" alt="Edited Image gs 20"></td>
177
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-30_mushroom.jpg" alt="Edited Image gs 30"></td>
178
+ <td align="center"><img src="https://huggingface.co/datasets/sayakpaul/sample-datasets/resolve/main/flux-edit-artifacts/edited_gs-40_mushroom.jpg" alt="Edited Image gs 40"></td>
179
  </tr>
180
  </table>
181