wanghaofan commited on
Commit
073442b
1 Parent(s): 517c79e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -0
README.md CHANGED
@@ -28,6 +28,27 @@ This is a LoRA trained on FLUX.1-dev for [Black Myth: Wukong](https://en.wikiped
28
 
29
  \<black-wukong\>, the monkey king
30
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
  ## Download model
33
 
 
28
 
29
  \<black-wukong\>, the monkey king
30
 
31
+ ## Example
32
+
33
+ ```
34
+ import torch
35
+ from diffusers import FluxPipeline
36
+
37
+ pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
38
+ pipe.load_lora_weights("wanghaofan/Black-Myth-Wukong-FLUX-LoRA")
39
+ pipe.fuse_lora(lora_scale=1.0)
40
+ pipe.to("cuda")
41
+
42
+ prompt = "<black-wukong>, the monkey king, walking through a snowy area, a highly detailed CGI rendering of a humanoid character with a monkey-like face, tall and slender, bushy mane of golden-brown hair, dressed in ornate, regal armor, armor features intricate, swirling patterns and floral designs, suggesting a high level of craftsmanship"
43
+
44
+ image = pipe(prompt,
45
+ num_inference_steps=20,
46
+ guidance_scale=5.0,
47
+ width=768, height=1024,
48
+ ).images[0]
49
+ image.save(f"example.png")
50
+ ```
51
+
52
 
53
  ## Download model
54