Commit
·
0fbce5e
1
Parent(s):
9fdc2ab
StableDiffusionPipeline.from_single_file
Browse files- handler.py +4 -5
- requirements.txt +3 -1
handler.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
from typing import Dict, List, Any
|
2 |
-
from diffusers import
|
3 |
-
ControlNetModel,
|
4 |
-
StableDiffusionControlNetPipeline,
|
5 |
-
)
|
6 |
|
7 |
|
8 |
class EndpointHandler():
|
9 |
def __init__(self, path=""):
|
10 |
-
self.pipeline =
|
|
|
|
|
11 |
|
12 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
13 |
"""
|
|
|
1 |
from typing import Dict, List, Any
|
2 |
+
from diffusers import ControlNetModel, StableDiffusionControlNetPipeline, StableDiffusionPipeline
|
|
|
|
|
|
|
3 |
|
4 |
|
5 |
class EndpointHandler():
|
6 |
def __init__(self, path=""):
|
7 |
+
self.pipeline = StableDiffusionPipeline.from_single_file(
|
8 |
+
"https://huggingface.co/artificialguybr/LogoRedmond-LogoLoraForSDXL/blob/main/LogoRedmond_LogoRedAF.safetensors"
|
9 |
+
)
|
10 |
|
11 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
12 |
"""
|
requirements.txt
CHANGED
@@ -18,4 +18,6 @@ urllib3
|
|
18 |
certifi
|
19 |
torch
|
20 |
torchvision
|
21 |
-
omegaconf
|
|
|
|
|
|
18 |
certifi
|
19 |
torch
|
20 |
torchvision
|
21 |
+
omegaconf
|
22 |
+
transformers
|
23 |
+
accelerate
|