root
commited on
Commit
·
50f301d
1
Parent(s):
7c65853
removing subfolder
Browse files- __pycache__/handler.cpython-310.pyc +0 -0
- handler.py +3 -5
- output.mp4 +0 -0
- output/gradio/animation_output.mp4 +0 -0
__pycache__/handler.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/handler.cpython-310.pyc and b/__pycache__/handler.cpython-310.pyc differ
|
|
|
handler.py
CHANGED
|
@@ -47,11 +47,10 @@ class EndpointHandler():
|
|
| 47 |
|
| 48 |
vae = AutoencoderKL.from_pretrained(config_path).to(device, dtype=self.weight_dtype)
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
reference_unet = UNet2DConditionModel.from_pretrained(
|
| 53 |
-
|
| 54 |
-
subfolder="unet"
|
| 55 |
).to(device, dtype=self.weight_dtype)
|
| 56 |
|
| 57 |
inference_config_path = os.path.join(base_dir, 'configs', 'inference', 'inference_v2.yaml')
|
|
@@ -63,9 +62,8 @@ class EndpointHandler():
|
|
| 63 |
|
| 64 |
infer_config = OmegaConf.load(inference_config_path)
|
| 65 |
denoising_unet = UNet3DConditionModel.from_pretrained_2d(
|
| 66 |
-
|
| 67 |
motion_module_path,
|
| 68 |
-
subfolder="unet",
|
| 69 |
unet_additional_kwargs=infer_config.unet_additional_kwargs,
|
| 70 |
).to(device, dtype=self.weight_dtype)
|
| 71 |
|
|
|
|
| 47 |
|
| 48 |
vae = AutoencoderKL.from_pretrained(config_path).to(device, dtype=self.weight_dtype)
|
| 49 |
|
| 50 |
+
pretrained_base_model_path_unet = os.path.join(base_dir, 'pretrained_weights', 'stable-diffusion-v1-5', 'unet')
|
| 51 |
|
| 52 |
reference_unet = UNet2DConditionModel.from_pretrained(
|
| 53 |
+
pretrained_base_model_path_unet,
|
|
|
|
| 54 |
).to(device, dtype=self.weight_dtype)
|
| 55 |
|
| 56 |
inference_config_path = os.path.join(base_dir, 'configs', 'inference', 'inference_v2.yaml')
|
|
|
|
| 62 |
|
| 63 |
infer_config = OmegaConf.load(inference_config_path)
|
| 64 |
denoising_unet = UNet3DConditionModel.from_pretrained_2d(
|
| 65 |
+
pretrained_base_model_path_unet,
|
| 66 |
motion_module_path,
|
|
|
|
| 67 |
unet_additional_kwargs=infer_config.unet_additional_kwargs,
|
| 68 |
).to(device, dtype=self.weight_dtype)
|
| 69 |
|
output.mp4
ADDED
|
Binary file (96.9 kB). View file
|
|
|
output/gradio/animation_output.mp4
CHANGED
|
Binary files a/output/gradio/animation_output.mp4 and b/output/gradio/animation_output.mp4 differ
|
|
|