-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
|
||
### 3.2 一键体验文生图系统 | ||
|
||
在运行下面的命令之前,需要在官网申请`API Key`和 `Secret key`两个密钥,然后执行下面的命令。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里最好能提供一下相关链接,以及截图
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
后续看看gradio要不要放到requirments里面
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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相关的图片生成方式
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上,命名需要注意一下
这里需要讨论一下,后续所有的文生图的pipelines都要这个pipeline吗?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的命名都统一一下吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经改成query_text_to_images
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
PR changes
Description