Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PPDiffusers] Fix ppdiffusers bug and support ZH stablediffusion #3663

Merged
merged 13 commits into from
Nov 6, 2022

Conversation

JunnYu
Copy link
Member

@JunnYu JunnYu commented Nov 3, 2022

PR types

Bug fixes

PR changes

Models

Description

  • 发布0.6.1版本
  • 支持 IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1 和 IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-EN-v0.1 中文权重
  • 修复windows环境下载模型失败的问题。
  • paddlenlp的attention_mask逻辑与HF不一致,因此人工设定全为1的attention_mask。
  • 增添更多的图片后缀格式,ext = ['png', 'jpg', 'jpeg', 'bmp', 'PNG', 'JPG', 'JPEG', 'BMP']
  • 使用AutoTokenizer和AutoModel,这样可以加载BERT和CLIP模型。
  • 删除loading_kwargs["paddle_dtype"] = paddle_dtype。
  • 加载模型默认使用eval模型。

@JunnYu JunnYu requested a review from guoshengCS November 3, 2022 05:40
@JunnYu
Copy link
Member Author

JunnYu commented Nov 3, 2022

目前出现了 "inf"的问题,需要修改一下

@JunnYu
Copy link
Member Author

JunnYu commented Nov 3, 2022

已经修复,替换INF为-1e9,否则0乘float inf会得到 nan

INF = float("-inf")
import paddle
paddle.to_tensor([[1,1,0,0]]) * INF
# Tensor(shape=[1, 4], dtype=float32, place=Place(gpu:0), stop_gradient=True,
#       [[-inf., -inf.,  nan ,  nan ]])

guoshengCS
guoshengCS previously approved these changes Nov 4, 2022
@JunnYu JunnYu requested a review from guoshengCS November 4, 2022 05:30
@JunnYu JunnYu merged commit ce31a77 into PaddlePaddle:develop Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants