modelscope / modelscope/DiffSynth-Studio

请问最新版本必须要大于python10吗?使用python9报错

Open
#953 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

File "/usr/local/lib/python3.9/site-packages/diffsynth/vram_management/layers.py", line 95, in
class AutoWrappedLinear(torch.nn.Linear, AutoTorchModule):
File "/usr/local/lib/python3.9/site-packages/diffsynth/vram_management/layers.py", line 119, in AutoWrappedLinear
bias: torch.Tensor | None = None,
TypeError: unsupported operand type(s) for |: 'torch._C._TensorMeta' and 'NoneType'

|是python10+后的语法,去除后可用

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with diffsynth/vram_management/layers.py around line 119 and reproduce the import or execution on Python 3.9 using the reported traceback. Check the affected type annotation for Python 3.9 compatibility, then verify that the module loads without the reported TypeError on Python 3.9.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.