Skip to content

Commit d0467a7

Browse files
committed
fix controlnet annotator
1 parent 36838a0 commit d0467a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/qwen_image/model_inference/Qwen-Image-Context-Control.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from modelscope import dataset_snapshot_download, snapshot_download
44
from diffsynth.pipelines.qwen_image import QwenImagePipeline, ModelConfig
55
from diffsynth.controlnets.processors import Annotator
6-
from diffsynth import download_models
76

8-
download_models(["Annotators:Depth"])
7+
allow_file_pattern = ["sk_model.pth", "sk_model2.pth", "dpt_hybrid-midas-501f0c75.pt", "ControlNetHED.pth", "body_pose_model.pth", "hand_pose_model.pth", "facenet.pth", "scannet.pt"]
8+
snapshot_download("lllyasviel/Annotators", local_dir="models/Annotators", allow_file_pattern=allow_file_pattern)
99

1010
pipe = QwenImagePipeline.from_pretrained(
1111
torch_dtype=torch.bfloat16,

examples/qwen_image/model_inference_low_vram/Qwen-Image-Context-Control.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from modelscope import dataset_snapshot_download, snapshot_download
44
from diffsynth.pipelines.qwen_image import QwenImagePipeline, ModelConfig
55
from diffsynth.controlnets.processors import Annotator
6-
from diffsynth import download_models
76

8-
download_models(["Annotators:Depth"])
7+
allow_file_pattern = ["sk_model.pth", "sk_model2.pth", "dpt_hybrid-midas-501f0c75.pt", "ControlNetHED.pth", "body_pose_model.pth", "hand_pose_model.pth", "facenet.pth", "scannet.pt"]
8+
snapshot_download("lllyasviel/Annotators", local_dir="models/Annotators", allow_file_pattern=allow_file_pattern)
99

1010
pipe = QwenImagePipeline.from_pretrained(
1111
torch_dtype=torch.bfloat16,

0 commit comments

Comments
 (0)