Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
社区用户反馈 0.29 diffusers 切换分辨率报错 #1033
原因是 0.29 的 transformer2d 的实现从 diffusers.models.transformer_2d 挪到了 diffusers.models.transformers.transformer_2d 里面,导致原来的代码 register 转换的 map 失败,运行报错
这个 PR 修复了 bug,把 0.29 的对应实现放在了一个新的文件里,增加可读性,并且准备以此为例子,对这部分代码进行重构。
另外对于装饰器函数,增加了 wrap(func) 的装饰。(原来的实现会改变函数 inspect 的内容,导致很难 debug)