Yuanshi commited on
Commit
7dd29f6
·
verified ·
1 Parent(s): c87d952

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -1
README.md CHANGED
@@ -7,4 +7,26 @@ tags:
7
 
8
  This model has been pushed to the Hub using ****:
9
  - Repo: [More Information Needed]
10
- - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  This model has been pushed to the Hub using ****:
9
  - Repo: [More Information Needed]
10
+ - Docs: [More Information Needed]
11
+
12
+ * **Basic Usage of LinFusion:**
13
+ ```python
14
+ from diffusers import AutoPipelineForText2Image
15
+ import torch
16
+
17
+ from src.linfusion import LinFusion
18
+ from src.tools import seed_everything
19
+
20
+ sd_repo = "Lykon/dreamshaper-8"
21
+
22
+ pipeline = AutoPipelineForText2Image.from_pretrained(
23
+ sd_repo, torch_dtype=torch.float16, variant="fp16"
24
+ ).to(torch.device("cuda"))
25
+
26
+ linfusion = LinFusion.construct_for(pipeline)
27
+
28
+ seed_everything(123)
29
+ image = pipeline(
30
+ "An astronaut floating in space. Beautiful view of the stars and the universe in the background."
31
+ ).images[0]
32
+ ```