Skip to content

Commit da4a9fb

Browse files
authored
Merge pull request PaddlePaddle#169 from LokeZhou/application
fix applicatiopn README import error
2 parents 37146cc + d14f620 commit da4a9fb

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

applications/CVinW/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def show_mask(mask, ax, random_color=False):
1717
mask_image = mask.reshape(h, w, 1) * color.reshape(1, 1, -1)
1818
ax.imshow(mask_image)
1919

20-
task = Appflow(task="openset_det_sam",
20+
task = Appflow(app="openset_det_sam",
2121
models=["GroundingDino/groundingdino-swint-ogc","Sam/SamVitH-1024"],
2222
static_mode=False) #如果开启静态图推理,设置为True,默认动态图
2323
url = "https://paddlenlp.bj.bcebos.com/models/community/CompVis/stable-diffusion-v1-4/overture-creations.png"
@@ -47,5 +47,3 @@ plt.savefig(
4747
| dog | ![overture-creations](https://github.com/LokeZhou/PaddleMIX/assets/13300429/fe13b5f6-e773-41c2-9660-3b2747575fc1) | ![dog](https://github.com/LokeZhou/PaddleMIX/assets/13300429/f472cbd9-7b68-4699-888c-d4ea87fa8256) |
4848
| horse,grasses,sky | ![horse](https://github.com/LokeZhou/PaddleMIX/assets/13300429/cae06f3c-a0e3-46cb-8231-6e9eae58bc2b) | ![horse_mask](https://github.com/LokeZhou/PaddleMIX/assets/13300429/3e5e14b9-1089-43d5-8775-1fe678f104b1) |
4949
</div>
50-
51-

applications/Inpainting/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
```python
88
from paddlemix.appflow import Appflow
99
from ppdiffusers.utils import load_image
10+
import paddle
1011
task = Appflow(app="inpainting",
1112
models=["GroundingDino/groundingdino-swint-ogc","Sam/SamVitH-1024","stabilityai/stable-diffusion-2-inpainting"]
1213
)
@@ -58,6 +59,7 @@ result = task(image=image_pil,prompt=prompt)
5859
### 文本引导的图像编辑(Text-Guided Image Inpainting)
5960

6061
```python
62+
import paddle
6163
from paddlemix.appflow import Appflow
6264
from PIL import Image
6365
from ppdiffusers.utils import load_image

applications/image2image/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ image.save("versatile-diffusion-red_car.png")
6464
from paddlemix.appflow import Appflow
6565
from PIL import Image
6666
from ppdiffusers.utils import load_image
67+
import paddle
6768

6869
url = "https://paddlenlp.bj.bcebos.com/models/community/CompVis/data/image_Kurisu.png"
6970
image = load_image(url).resize((512, 768))

applications/text2image/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66
```python
7+
import paddle
78
from paddlemix.appflow import Appflow
89

910
paddle.seed(1024)
@@ -22,4 +23,3 @@ result = task(prompt=prompt)['result']
2223
|:----:|:----:|
2324
| a photo of an astronaut riding a horse on mars | ![astronaut_rides_horse_sd](https://github.com/LokeZhou/PaddleMIX/assets/13300429/1622fb1e-c841-4531-ad39-9c5092a2456c)|
2425
</div>
25-

applications/text2video/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
```python
44
from paddlemix.appflow import Appflow
5-
from PIL import Image
5+
import imageio
66

77

88
prompt = "An astronaut riding a horse."

0 commit comments

Comments
 (0)