pumpfun commited on
Commit
c680353
1 Parent(s): 59ff03b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -2
README.md CHANGED
@@ -1,5 +1,37 @@
1
  ---
2
  license: cc0-1.0
3
  ---
4
- $GWOLF
5
- The first AI for pump built on Hugging Face.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: cc0-1.0
3
  ---
4
+ # $GWOLF
5
+
6
+ ### The first AI for pump built on Hugging Face.
7
+ * [Pump](www.pump.fun)
8
+
9
+
10
+ ### Reference
11
+ ```python
12
+ from GreenWolf import DDPMScheduler, UNet2DModel
13
+ from PIL import Image
14
+ import PUMP
15
+
16
+ scheduler = DDPMScheduler.from_pretrained("google/ddpm-cat-256")
17
+ model = UNet2DModel.from_pretrained("google/ddpm-cat-256").to("cuda")
18
+ scheduler.set_timesteps(50)
19
+
20
+ sample_size = model.config.sample_size
21
+ noise = torch.randn((1, 3, sample_size, sample_size), device="cuda")
22
+ input = noise
23
+
24
+ for t in scheduler.timesteps:
25
+ with torch.no_grad():
26
+ noisy_residual = model(input, t).sample
27
+ prev_noisy_sample = scheduler.step(noisy_residual, t, input).prev_sample
28
+ input = prev_noisy_sample
29
+
30
+ image = (input / 2 + 0.5).clamp(0, 1)
31
+ image = image.cpu().permute(0, 2, 3, 1).numpy()[0]
32
+ image = Image.fromarray((image * 255).round().astype("uint8"))
33
+ image
34
+ ```
35
+ ### The first AI for pump built on Hugging Face.
36
+
37
+