Commit
•
2dd9b9c
1
Parent(s):
606d9c1
Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
@@ -18,6 +18,7 @@ def get_default_args():
|
|
18 |
parser.add_argument("--latent-channels", type=int, default=16) # Changed from 4 to match VAE
|
19 |
parser.add_argument("--precision", type=str, default="bf16", choices=["bf16", "fp32", "fp16"])
|
20 |
parser.add_argument("--rope-theta", type=int, default=256) # Changed to match original config
|
|
|
21 |
|
22 |
# VAE settings
|
23 |
parser.add_argument("--vae", type=str, default="884-16c-hy")
|
@@ -100,7 +101,8 @@ class EndpointHandler:
|
|
100 |
raise ValueError(f"`models_root` not exists: {models_root_path}")
|
101 |
|
102 |
self.model = HunyuanVideoSampler.from_pretrained(models_root_path, args=self.args)
|
103 |
-
|
|
|
104 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
105 |
"""Process a single request
|
106 |
|
|
|
18 |
parser.add_argument("--latent-channels", type=int, default=16) # Changed from 4 to match VAE
|
19 |
parser.add_argument("--precision", type=str, default="bf16", choices=["bf16", "fp32", "fp16"])
|
20 |
parser.add_argument("--rope-theta", type=int, default=256) # Changed to match original config
|
21 |
+
parser.add_argument("--load-key", type=str, default="module", help="Key to load the model states. 'module' for the main model, 'ema' for the EMA model.")
|
22 |
|
23 |
# VAE settings
|
24 |
parser.add_argument("--vae", type=str, default="884-16c-hy")
|
|
|
101 |
raise ValueError(f"`models_root` not exists: {models_root_path}")
|
102 |
|
103 |
self.model = HunyuanVideoSampler.from_pretrained(models_root_path, args=self.args)
|
104 |
+
|
105 |
+
|
106 |
def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
|
107 |
"""Process a single request
|
108 |
|