modelscope / modelscope/DiffSynth-Studio
Document example code has import error
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13.1k
- Forks
- 1.3k
- Avg merge
- 13h 12m
- Merged PRs (30d)
- 45
Description
The dcoument guide example code is
from diffsynth import ModelManager, SDXLImagePipeline
model_manager = ModelManager(device="cuda", model_id_list=["StableDiffusionXL_v1"])
pipe = SDXLImagePipeline.from_model_manager(model_manager)
image = pipe(
prompt="Diffuse light particles in the universe",
height=576, width=1024, seed=0
)
image.save("image.jpg")
But it would cause Import Error when running this code after pip install.
Traceback (most recent call last):
File "DiffSynth-Studio-main/install.py", line 1, in <module>
from diffsynth import ModelManager, SDXLImagePipeline
ImportError: cannot import name 'ModelManager' from 'diffsynth' (DiffSynth-Studio-main/diffsynth/__init__.py)
Instead, the import should be
from diffsynth.models import ModelManager
from diffsynth.pipelines import SDXLImagePipeline
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
Find the documentation guide containing the shown Python example and compare its imports with the installed package layout. Verify the example after pip install; done means it imports ModelManager and SDXLImagePipeline without ImportError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100