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

Add ERNIE-ViLG models into Pipelines #3512

Merged
merged 7 commits into from
Oct 21, 2022
Merged

Conversation

w5688414
Copy link
Contributor

PR types

  • New features

PR changes

  • Models

Description

  • Add ERNIE-ViLG models into Pipelines

@w5688414 w5688414 requested a review from wawltor October 19, 2022 10:33
@w5688414 w5688414 self-assigned this Oct 19, 2022

### 3.2 一键体验文生图系统

在运行下面的命令之前,需要在官网申请`API Key`和 `Secret key`两个密钥,然后执行下面的命令。
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里最好能提供一下相关链接,以及截图

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改


WebUI使用了[gradio前端](https://gradio.app/),首先需要安装gradio,运行命令如下:
```
pip install gradio
Copy link
Collaborator

Choose a reason for hiding this comment

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

后续看看gradio要不要放到requirments里面

Copy link
Contributor Author

Choose a reason for hiding this comment

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

如果以后都是基于Gradio开发,我觉得可以

from pipelines.nodes.base import BaseComponent


class ErnieVilGImageGenerator(BaseComponent):
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个咱们要不要区分一下 输入AK、SK这种的API形式,和普通的文生图的形式在命名上要不要区分开
后续咱们piplines需要部署模型形式的

同时建议Componet的命令和领域名字相关,ImageGenerator 也包括了GAN相关的图片生成方式

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经换成ErnieTextToImageGenerator

@@ -263,3 +264,34 @@ def run(self,
"""
output = self.pipeline.run(query=query, params=params, debug=debug)
return output


class ImageGenerationPipeline(BaseStandardPipeline):
Copy link
Collaborator

Choose a reason for hiding this comment

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

同上,命名需要注意一下

这里需要讨论一下,后续所有的文生图的pipelines都要这个pipeline吗?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经修改成TextToImagePipeline

@@ -81,6 +81,27 @@ def query(request: QueryRequest):
return result


@router.post("/query_images",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里的命名都统一一下吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已经改成query_text_to_images

Copy link
Collaborator

@wawltor wawltor left a comment

Choose a reason for hiding this comment

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

LGTM

@w5688414 w5688414 merged commit fb0cb9b into PaddlePaddle:develop Oct 21, 2022
@w5688414 w5688414 deleted the pip31 branch September 13, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants