alfredplpl
commited on
Commit
•
7d7617d
1
Parent(s):
e4b1580
Update README.md
Browse files
README.md
CHANGED
@@ -22,6 +22,31 @@ tags:
|
|
22 |
6. Get the following image.
|
23 |
![example](example.jpg)
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
### Examples
|
26 |
|
27 |
**Please use ChatGPT or Claude to make a prompt!**
|
|
|
22 |
6. Get the following image.
|
23 |
![example](example.jpg)
|
24 |
|
25 |
+
- diffusers
|
26 |
+
1. Install libraries (diffusers etc.).
|
27 |
+
2. Run the following code.
|
28 |
+
```python
|
29 |
+
import torch
|
30 |
+
from diffusers import FluxPipeline
|
31 |
+
|
32 |
+
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
33 |
+
pipe.load_lora_weights("alfredplpl/flux.1-dev-modern-anime-lora", weight_name="modern-anime-lora.safetensors")
|
34 |
+
pipe.to("cuda")
|
35 |
+
|
36 |
+
prompt = "modern anime style, An anime girl holding a sword. She is wearing school uniform. She is saying \"Hello World\" with the speech bubble."
|
37 |
+
image = pipe(
|
38 |
+
prompt,
|
39 |
+
height=1024,
|
40 |
+
width=1024,
|
41 |
+
guidance_scale=3.5,
|
42 |
+
output_type="pil",
|
43 |
+
num_inference_steps=50,
|
44 |
+
max_sequence_length=512,
|
45 |
+
generator=torch.Generator().manual_seed(0)
|
46 |
+
).images[0]
|
47 |
+
image.save("flux-dev.png")
|
48 |
+
```
|
49 |
+
|
50 |
### Examples
|
51 |
|
52 |
**Please use ChatGPT or Claude to make a prompt!**
|