Update README.md
Browse files
README.md
CHANGED
|
@@ -28,19 +28,18 @@ fast_sd_1.5 is a part of TME lyralab Fast Model Plan.
|
|
| 28 |
## Uses
|
| 29 |
|
| 30 |
```python
|
| 31 |
-
from
|
| 32 |
-
|
|
|
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
-
# text input
|
| 38 |
-
text = "A red ballon flying in the sky"
|
| 39 |
-
output_img = inference_model.infer(text=text)
|
| 40 |
|
| 41 |
-
# img input
|
| 42 |
-
img = Image.open("test.jpg")
|
| 43 |
-
output_img = inference_model.infer(img=img)
|
| 44 |
```
|
| 45 |
|
| 46 |
|
|
|
|
| 28 |
## Uses
|
| 29 |
|
| 30 |
```python
|
| 31 |
+
from lyraSD import LyraSD
|
| 32 |
+
|
| 33 |
+
t2imodel = LyraSD("text2img", "./sd1.5-engine")
|
| 34 |
+
t2imodel.inference(prompt="a red ballon flying in the sky")
|
| 35 |
|
| 36 |
|
| 37 |
+
from PIL import Image
|
| 38 |
+
i2imodel = LyraSD("img2img", "./sd1.5-engine")
|
| 39 |
+
demo_img = Image.open("output/text2img_demo.jpg")
|
| 40 |
+
i2imodel.inference(prompt="comic style", image=demo_img)
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
```
|
| 44 |
|
| 45 |
|