Update README.md
Browse files
README.md
CHANGED
|
@@ -32,8 +32,23 @@ license_name: flux-1-dev-non-commercial-license
|
|
| 32 |
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
| 33 |
---
|
| 34 |
# Color-Patette-Flux_dev
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
# Model description
|
| 39 |
|
|
|
|
| 32 |
license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md
|
| 33 |
---
|
| 34 |
# Color-Patette-Flux_dev
|
| 35 |
+
## Text to Image
|
| 36 |
+
<Gallery />
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
import torch
|
| 40 |
+
from diffusers import FluxPipeline
|
| 41 |
+
|
| 42 |
+
prompt = "[COLOR_PALETTE] This two-part image showcases the transformation from a color palette to a image. \
|
| 43 |
+
[LEFT] a color palette with eight 5 different colors. \
|
| 44 |
+
[RIGHT] an intricately designed perfume bottle resting on a vintage carved dressing table, flanked by elegant makeup and jewelry, with a gilded mirror above and a vase of peonies adding a romantic ambiance, all depicted in a refined vintage style."
|
| 45 |
+
|
| 46 |
+
pipe_t2i = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
|
| 47 |
+
pipe_t2i.load_lora_weights("./color_palette_lora.safetensors")
|
| 48 |
+
pipe_t2i.enable_lora()
|
| 49 |
+
out = pipe_t2i(prompt=prompt, guidance_scale=3.5, height=768, width=512, num_inference_steps=50).images[0]
|
| 50 |
+
out.save("t2i_color_palette.png")
|
| 51 |
+
```
|
| 52 |
|
| 53 |
# Model description
|
| 54 |
|