bluestarburst
commited on
Commit
•
e2ccff0
1
Parent(s):
83f7703
Upload folder using huggingface_hub
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -66,7 +66,7 @@ class EndpointHandler():
|
|
66 |
self.pipeline = AnimationPipeline(
|
67 |
vae=vae, text_encoder=text_encoder, tokenizer=tokenizer, unet=unet,
|
68 |
scheduler=DDIMScheduler(**OmegaConf.to_container(inference_config.noise_scheduler_kwargs.DDIMScheduler))
|
69 |
-
)
|
70 |
|
71 |
# huggingface download motion module from bluestarburst/AnimateDiff-SceneFusion/models/Motion_Module/mm_sd_v15.ckpt
|
72 |
|
@@ -130,7 +130,7 @@ class EndpointHandler():
|
|
130 |
self.pipeline = convert_lora(self.pipeline, state_dict)
|
131 |
# self.pipeline = convert_lora(self.pipeline, state_dict, alpha=model_config.lora_alpha)
|
132 |
|
133 |
-
self.pipeline
|
134 |
|
135 |
def __call__(self, data : Any):
|
136 |
"""
|
@@ -205,4 +205,4 @@ class EndpointHandler():
|
|
205 |
# This function will be called during inference time.
|
206 |
|
207 |
|
208 |
-
new_handler = EndpointHandler()
|
|
|
66 |
self.pipeline = AnimationPipeline(
|
67 |
vae=vae, text_encoder=text_encoder, tokenizer=tokenizer, unet=unet,
|
68 |
scheduler=DDIMScheduler(**OmegaConf.to_container(inference_config.noise_scheduler_kwargs.DDIMScheduler))
|
69 |
+
).to("cuda")
|
70 |
|
71 |
# huggingface download motion module from bluestarburst/AnimateDiff-SceneFusion/models/Motion_Module/mm_sd_v15.ckpt
|
72 |
|
|
|
130 |
self.pipeline = convert_lora(self.pipeline, state_dict)
|
131 |
# self.pipeline = convert_lora(self.pipeline, state_dict, alpha=model_config.lora_alpha)
|
132 |
|
133 |
+
self.pipeline.to("cuda")
|
134 |
|
135 |
def __call__(self, data : Any):
|
136 |
"""
|
|
|
205 |
# This function will be called during inference time.
|
206 |
|
207 |
|
208 |
+
# new_handler = EndpointHandler()
|