BAAI
/

ryanzhangfan commited on
Commit
f58720c
1 Parent(s): cb9cf0f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -3
README.md CHANGED
@@ -71,7 +71,7 @@ ret = pipe(prompt)
71
  ret.images[0].save("astronaut.png")
72
 
73
  # image editing
74
- image = Image.open(requests.get('https://github.com/baaivision/Emu/Emu2/examples/dog2.jpg?raw=true',stream=True).raw).convert('RGB')
75
  prompt = [image, "wearing a red hat on the beach."]
76
  ret = pipe(prompt)
77
  ret.images[0].save("dog_hat_beach.png")
@@ -92,7 +92,7 @@ dog3_mask = draw_box(120, 264, 320, 438)
92
 
93
  prompt = [
94
  "<grounding>",
95
- "A photo of",
96
  "<phrase>the first dog</phrase>"
97
  "<object>",
98
  dog1_mask,
@@ -108,10 +108,19 @@ prompt = [
108
  dog3_mask,
109
  "</object>",
110
  dog3,
111
- "on the grass",
112
  ]
113
  ret = pipe(prompt)
114
  ret.images[0].save("three_dogs.png")
 
 
 
 
 
 
 
 
 
 
115
  ```
116
 
117
  ## Citation
 
71
  ret.images[0].save("astronaut.png")
72
 
73
  # image editing
74
+ image = Image.open(requests.get('https://github.com/baaivision/Emu/Emu2/examples/dog.jpg?raw=true',stream=True).raw).convert('RGB')
75
  prompt = [image, "wearing a red hat on the beach."]
76
  ret = pipe(prompt)
77
  ret.images[0].save("dog_hat_beach.png")
 
92
 
93
  prompt = [
94
  "<grounding>",
95
+ "An oil painting of three dogs,",
96
  "<phrase>the first dog</phrase>"
97
  "<object>",
98
  dog1_mask,
 
108
  dog3_mask,
109
  "</object>",
110
  dog3,
 
111
  ]
112
  ret = pipe(prompt)
113
  ret.images[0].save("three_dogs.png")
114
+
115
+ # Autoencoding
116
+ # to enable the autoencoding mode, you can only input exactly one image as prompt
117
+ # if you want the model to generate an image,
118
+ # please input extra empty text "" besides the image, e.g.
119
+ # autoencoding mode: prompt = image or [image]
120
+ # generation mode: prompt = ["", image] or [image, ""]
121
+ prompt = Image.open("./examples/doodle.jpg").convert("RGB")
122
+ ret = pipe(prompt)
123
+ ret.image.save("doodle_ae.png")
124
  ```
125
 
126
  ## Citation