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