Update pipeline_void.py: handle diffusers/ subfolder for local paths
Browse files
diffusers/pipeline_void.py
CHANGED
|
@@ -378,6 +378,9 @@ class VOIDPipeline(CogVideoXFunInpaintPipeline):
|
|
| 378 |
|
| 379 |
if os.path.isdir(pretrained_model_name_or_path):
|
| 380 |
checkpoint_path = os.path.join(pretrained_model_name_or_path, checkpoint_name)
|
|
|
|
|
|
|
|
|
|
| 381 |
else:
|
| 382 |
checkpoint_path = hf_hub_download(
|
| 383 |
repo_id=pretrained_model_name_or_path,
|
|
|
|
| 378 |
|
| 379 |
if os.path.isdir(pretrained_model_name_or_path):
|
| 380 |
checkpoint_path = os.path.join(pretrained_model_name_or_path, checkpoint_name)
|
| 381 |
+
if not os.path.exists(checkpoint_path):
|
| 382 |
+
# Check parent dir (checkpoints at root, code in diffusers/)
|
| 383 |
+
checkpoint_path = os.path.join(pretrained_model_name_or_path, "..", checkpoint_name)
|
| 384 |
else:
|
| 385 |
checkpoint_path = hf_hub_download(
|
| 386 |
repo_id=pretrained_model_name_or_path,
|