modelscope / modelscope/DiffSynth-Studio
ImportError: cannot import name 'SiglipVisionTransformer' from 'transformers.models.siglip.modeling_siglip'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
Traceback (most recent call last):
File "/workspace/vk_git_ws/DiffSynth-Studio/examples/qwen_image/model_training/train.py", line 3, in
from diffsynth.pipelines.qwen_image import QwenImagePipeline, ModelConfig
File "/workspace/vk_git_ws/DiffSynth-Studio/diffsynth/pipelines/qwen_image.py", line 19, in
from ..models.siglip2_image_encoder import Siglip2ImageEncoder
File "/workspace/vk_git_ws/DiffSynth-Studio/diffsynth/models/siglip2_image_encoder.py", line 1, in
from transformers.models.siglip.modeling_siglip import SiglipVisionTransformer, SiglipVisionConfig
ImportError: cannot import name 'SiglipVisionTransformer' from 'transformers.models.siglip.modeling_siglip' (/usr/local/lib/python3.11/dist-packages/transformers/models/siglip/modeling_siglip.py)
Reproduction Steps:
- Git clone repo
- pip install -e .
- chmod +x ./examples/qwen_image/model_training/lora/Qwen-Image-Edit-2511.sh
- ./examples/qwen_image/model_training/lora/Qwen-Image-Edit-2511.sh
In step 4, lora refinement I am getting the above error. I see another issue with the same error but it didn't help resolve.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/qwen_image/model_training/train.py and reproduce the failure using examples/qwen_image/model_training/lora/Qwen-Image-Edit-2511.sh after pip install -e .. Trace the import through diffsynth/pipelines/qwen_image.py to diffsynth/models/siglip2_image_encoder.py and compare it with the installed transformers module. Done means the Qwen Image LoRA refinement command starts without this ImportError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100