Update README.md
Browse files
README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
tags:
|
| 4 |
-
- diffusers:ImageDreamPipeline
|
| 5 |
---
|
| 6 |
# ImageDream-diffusers Model Card
|
| 7 |
This is a port of https://huggingface.co/Peng-Wang/ImageDream into diffusers.
|
|
@@ -12,6 +10,36 @@ In ashawkey's work, UNet did not ported to diffusers.
|
|
| 12 |
This work has been fully ported to diffusers, including UNet.
|
| 13 |
And separated the IP-adapter-plus from the unet.
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
## Citation
|
| 16 |
```
|
| 17 |
@article{wang2023imagedream,
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
# ImageDream-diffusers Model Card
|
| 5 |
This is a port of https://huggingface.co/Peng-Wang/ImageDream into diffusers.
|
|
|
|
| 10 |
This work has been fully ported to diffusers, including UNet.
|
| 11 |
And separated the IP-adapter-plus from the unet.
|
| 12 |
|
| 13 |
+
## Diffusers
|
| 14 |
+
```python
|
| 15 |
+
import torch
|
| 16 |
+
from diffusers import DiffusionPipeline
|
| 17 |
+
from diffusers.utils import make_image_grid
|
| 18 |
+
from PIL import Image
|
| 19 |
+
|
| 20 |
+
pipe = DiffusionPipeline.from_pretrained(
|
| 21 |
+
"kiigii/imagedream-ipmv-diffusers",
|
| 22 |
+
torch_dtype=torch.float16,
|
| 23 |
+
trust_remote_code=True,
|
| 24 |
+
custom_pipeline="pipeline_imagedream",
|
| 25 |
+
)
|
| 26 |
+
pipe.load_ip_adapter()
|
| 27 |
+
pipe.to("cude")
|
| 28 |
+
|
| 29 |
+
prompt = ""
|
| 30 |
+
image = Image.open(...)
|
| 31 |
+
|
| 32 |
+
mv_images = pipe(
|
| 33 |
+
ip_adapter_image=image,
|
| 34 |
+
guidance_scale=5,
|
| 35 |
+
num_inference_steps=30,
|
| 36 |
+
elevation=0,
|
| 37 |
+
num_images_per_prompt=1
|
| 38 |
+
).images
|
| 39 |
+
mv_grid = make_image_grid(mv_images[:4], 2, 2)
|
| 40 |
+
mv_grid.save("mv_image.png")
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
## Citation
|
| 44 |
```
|
| 45 |
@article{wang2023imagedream,
|