Spaces:
Paused
Paused
woods-today
commited on
Commit
•
6a05099
1
Parent(s):
cb76ab3
Working on it
Browse files- endpoints.py +5 -0
endpoints.py
CHANGED
@@ -3,6 +3,11 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
3 |
from routers import inference, training
|
4 |
from huggingface_hub import login
|
5 |
from config import settings
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
login(settings.huggingface_key)
|
8 |
|
|
|
3 |
from routers import inference, training
|
4 |
from huggingface_hub import login
|
5 |
from config import settings
|
6 |
+
import torch
|
7 |
+
from diffusers import StableDiffusionPipeline
|
8 |
+
|
9 |
+
pipe = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16)
|
10 |
+
|
11 |
|
12 |
login(settings.huggingface_key)
|
13 |
|