alfredplpl commited on
Commit
6190ed9
1 Parent(s): 54b10bf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -5
README.md CHANGED
@@ -25,7 +25,7 @@ tags:
25
  - diffusers
26
  1. Install libraries (diffusers etc.).
27
  ```bash
28
- pip install git+https://github.com/huggingface/diffusers
29
  ```
30
  2. Run the following code.
31
  ```python
@@ -34,18 +34,19 @@ 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.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=1024,
43
- width=1024,
44
  guidance_scale=3.5,
45
  output_type="pil",
46
  num_inference_steps=50,
47
  max_sequence_length=512,
48
- generator=torch.Generator().manual_seed(0)
 
49
  ).images[0]
50
  image.save("flux-dev.png")
51
  ```
 
25
  - diffusers
26
  1. Install libraries (diffusers etc.).
27
  ```bash
28
+ pip install diffusers peft
29
  ```
30
  2. Run the following code.
31
  ```python
 
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
  ```