wanghaofan commited on
Commit
4995cf3
1 Parent(s): 000f3b7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -2
README.md CHANGED
@@ -37,8 +37,28 @@ license_link: >-
37
  You should use `Futuristic bzonze-colored` to trigger the image generation.
38
 
39
 
40
- ## Download model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- Weights for this model are available in Safetensors format.
43
 
44
  [Download](/Shakker-Labs/SD3.5-LoRA-Futuristic-Bzonze-Colored/tree/main) them in the Files & versions tab.
 
37
  You should use `Futuristic bzonze-colored` to trigger the image generation.
38
 
39
 
40
+ ## Inference
41
+
42
+ ```python
43
+ import torch
44
+ from diffusers import StableDiffusion3Pipeline # please install diffusers from the source
45
+
46
+ pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large-diffusers", torch_dtype=torch.bfloat16)
47
+ pipe.load_lora_weights("Shakker-Labs/SD3.5-LoRA-Futuristic-Bzonze-Colored", weight_name="SD35-lora-Futuristic-Bzonze-Colored.safetensors")
48
+ pipe.fuse_lora(lora_scale=1.0)
49
+ pipe.to("cuda")
50
+
51
+ prompt = "a cup, Futuristic bzonze-colored"
52
+ negative_prompt = "(lowres, low quality, worst quality)"
53
+
54
+ image = pipe(prompt=prompt,
55
+ negative_prompt=negative_prompt
56
+ num_inference_steps=24,
57
+ guidance_scale=4.0,
58
+ width=960, height=1280,
59
+ ).images[0]
60
+ image.save(f"toy_example.jpg")
61
+ ```
62
 
 
63
 
64
  [Download](/Shakker-Labs/SD3.5-LoRA-Futuristic-Bzonze-Colored/tree/main) them in the Files & versions tab.