bekushal Nitin9sitare commited on
Commit
1b8f7f2
1 Parent(s): 7c5b327

Update README.md (#2)

Browse files

- Update README.md (926fa8e85a95b7ba6db68fc9250e5bdc8b17997b)


Co-authored-by: Nitin <[email protected]>

Files changed (1) hide show
  1. README.md +23 -0
README.md CHANGED
@@ -15,6 +15,29 @@ license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICE
15
 
16
  <Gallery />
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  ## Model description
20
 
 
15
 
16
  <Gallery />
17
 
18
+ ## Inference
19
+
20
+
21
+ ```python
22
+
23
+ import torch
24
+ from diffusers import FluxPipeline
25
+
26
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
27
+ pipe.load_lora_weights("bekushal/Flux_finetune_swami_vevikananda", weight_name="Flux_finetune_swami_vevikananda.safetensors")
28
+ pipe.fuse_lora(lora_scale=1.0)
29
+ pipe.to("cuda")
30
+
31
+ prompt = "A young Indian monk with sunglasses in a cricket ground, holding a bat in his hand."
32
+
33
+ image = pipe(prompt,
34
+ num_inference_steps=24,
35
+ guidance_scale=3.5,
36
+ width=960, height=1280,
37
+ ).images[0]
38
+ image.save(f"example.png")
39
+ ```
40
+
41
 
42
  ## Model description
43