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] add from_hf_hub to from_pretrained #4625

Merged
merged 7 commits into from
Feb 3, 2023

Conversation

sijunhe
Copy link
Collaborator

@sijunhe sijunhe commented Feb 2, 2023

PR types

PR changes

Description

from ppdiffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained("sijunhe/stable-diffusion-v1-5", from_hf_hub=True)

@paddle-bot
Copy link

paddle-bot bot commented Feb 2, 2023

Thanks for your contribution!

@sijunhe sijunhe requested a review from JunnYu February 2, 2023 10:05
@sijunhe sijunhe marked this pull request as ready for review February 2, 2023 10:05
@codecov
Copy link

codecov bot commented Feb 2, 2023

Codecov Report

Merging #4625 (ecd2270) into develop (6b0b8f9) will increase coverage by 0.19%.
The diff coverage is 84.09%.

@@             Coverage Diff             @@
##           develop    #4625      +/-   ##
===========================================
+ Coverage    41.92%   42.11%   +0.19%     
===========================================
  Files          434      433       -1     
  Lines        61824    61819       -5     
===========================================
+ Hits         25919    26035     +116     
+ Misses       35905    35784     -121     
Impacted Files Coverage Δ
paddlenlp/transformers/image_processing_utils.py 26.00% <33.33%> (+0.46%) ⬆️
paddlenlp/transformers/model_utils.py 77.75% <90.90%> (+1.44%) ⬆️
paddlenlp/transformers/auto/modeling.py 80.55% <100.00%> (+4.25%) ⬆️
paddlenlp/transformers/auto/tokenizer.py 84.17% <100.00%> (+0.34%) ⬆️
paddlenlp/transformers/clip/modeling.py 60.68% <100.00%> (+0.07%) ⬆️
paddlenlp/transformers/configuration_utils.py 70.85% <100.00%> (+0.07%) ⬆️
paddlenlp/transformers/tokenizer_utils_base.py 78.38% <100.00%> (+0.06%) ⬆️
paddlenlp/utils/downloader.py 61.23% <100.00%> (+3.44%) ⬆️
paddlenlp/transformers/pegasus/modeling.py 71.80% <0.00%> (-0.84%) ⬇️
paddlenlp/transformers/nezha/modeling.py 94.36% <0.00%> (-0.64%) ⬇️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@JunnYu
Copy link
Member

JunnYu commented Feb 3, 2023

colab 测试命令

# install paddlepaddle
!python -m pip install paddlepaddle-gpu==2.4.1.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
!git clone https://github.com/sijunhe/PaddleNLP.git
%cd PaddleNLP
!git checkout -f ppdiffuser_hf
# install ppdiffusers
%cd ppdiffusers
!python setup.py install
# install paddlenlp
%cd ..
!python setup.py install

# test
from ppdiffusers import StableDiffusionPipeline
import ppdiffusers, paddlenlp
print(ppdiffusers.__version__, paddlenlp.__version__)
pipe = StableDiffusionPipeline.from_pretrained("sijunhe/stable-diffusion-v1-5", from_hf_hub=True)

Copy link
Member

@JunnYu JunnYu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sijunhe sijunhe merged commit 2f2e40a into PaddlePaddle:develop Feb 3, 2023
@sijunhe sijunhe deleted the ppdiffuser_hf branch February 3, 2023 10:00
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.

None yet

2 participants