Commit
·
1aa28b0
1
Parent(s):
c39cce5
handler
Browse files- handler.py +3 -14
handler.py
CHANGED
@@ -7,18 +7,7 @@ class EndpointHandler():
|
|
7 |
self.pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
|
8 |
self.pipeline.load_lora_weights(".", weight_name="./safetensors.safetensors")
|
9 |
|
10 |
-
# self.pipeline = StableDiffusionPipeline.from_single_file(
|
11 |
-
# "https://huggingface.co/artificialguybr/LogoRedmond-LogoLoraForSDXL/blob/main/LogoRedmond_LogoRedAF.safetensors"
|
12 |
-
# )
|
13 |
-
|
14 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
15 |
-
|
16 |
-
data
|
17 |
-
|
18 |
-
kwargs
|
19 |
-
Return:
|
20 |
-
A :obj:`list` | `dict`: will be serialized and returned
|
21 |
-
"""
|
22 |
-
# Use self.pipeline for inference
|
23 |
-
# result = self.pipeline(your_input_data)
|
24 |
-
# return result
|
|
|
7 |
self.pipeline = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0")
|
8 |
self.pipeline.load_lora_weights(".", weight_name="./safetensors.safetensors")
|
9 |
|
|
|
|
|
|
|
|
|
10 |
def __call__(self, data: Dict[str, Any]) -> List[Dict[str, Any]]:
|
11 |
+
print('data:', data)
|
12 |
+
result = self.pipeline(data)
|
13 |
+
return result
|
|
|
|
|
|
|
|
|
|
|
|
|
|