Create Core.py
Browse files
Core.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import torch
|
2 |
+
from diffusers import StableDiffusionPipeline
|
3 |
+
import mediapipe as mp
|
4 |
+
|
5 |
+
class EliteMotionModel:
|
6 |
+
def __init__(self):
|
7 |
+
self.model = StableDiffusionPipeline.from_pretrained("BootyShakerAI")
|
8 |
+
self.motion_tracker = mp.solutions.pose.Pose(
|
9 |
+
min_detection_confidence=0.8,
|
10 |
+
min_tracking_confidence=0.8
|
11 |
+
)
|
12 |
+
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
+
self.model.to(self.device)
|