Updated Readme with SDXL images

This commit is contained in:
ai-modelscope
2024-03-25 17:00:17 +08:00
parent a3a511b3da
commit 9114bd08bb
25 changed files with 112 additions and 32 deletions

28
.gitattributes vendored
View File

@@ -1,34 +1,42 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bin.* filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zstandard filter=lfs diff=lfs merge=lfs -text
*.tfevents* filter=lfs diff=lfs merge=lfs -text
*.db* filter=lfs diff=lfs merge=lfs -text
*.ark* filter=lfs diff=lfs merge=lfs -text
**/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
**/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
**/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]192445.png filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]192659.png filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]193632.png filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]193802.png filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]193948.png filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]194130.png filter=lfs diff=lfs merge=lfs -text
resources/Screenshot[[:space:]]2024-03-19[[:space:]]195340.png filter=lfs diff=lfs merge=lfs -text

View File

@@ -1,26 +1,70 @@
---
#以下为文本生成的 "tasks"示例您可以从此网页中了解更多相关信息https://modelscope.cn/docs/%E4%BB%BB%E5%8A%A1%E7%9A%84%E4%BB%8B%E7%BB%8D
#tasks:
#- text-generation
license: Apache License 2.0
license: apache-2.0
pipeline_tag: text-to-image
tags:
- stable diffusion
- ip adapter
---
### 当前模型的贡献者未提供更加详细的模型介绍。模型文件和权重,可浏览“模型文件”页面获取。
#### 您可以通过如下git clone命令或者ModelScope SDK来下载模型
SDK下载
```bash
#安装ModelScope
pip install modelscope
```
```python
#SDK模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('AI-ModelScope/ip-composition-adapter')
```
Git下载
```
#Git模型下载
git clone https://www.modelscope.cn/AI-ModelScope/ip-composition-adapter.git
```
# IP Composition Adapter
<p style="color: lightgrey;">如果您是本模型的贡献者,我们邀请您根据<a href="https://modelscope.cn/docs/ModelScope%E6%A8%A1%E5%9E%8B%E6%8E%A5%E5%85%A5%E6%B5%81%E7%A8%8B%E6%A6%82%E8%A7%88" style="color: lightgrey; text-decoration: underline;">模型贡献文档</a>,及时完善模型卡片内容。</p>
This adapter for Stable Diffusion 1.5 and SDXL is designed to inject the general composition of an image into the model while mostly ignoring the style and content. Meaning a portrait of a person waving their left hand will result in an image of a completely different person waving with their left hand.
### Follow Me
I do a lot of experiments and other things. To keep up to date, follow me on [Twitter](https://twitter.com/ostrisai).
### Thanks
I want to give a special thanks to [POM](https://huggingface.co/peteromallet) with [BANODOCO](https://huggingface.co/BANODOCO). This was their idea, I just trained it. Full credit goes to them.
## Usage
Use just like other IP+ adapters from [h94/IP-Adapter](https://huggingface.co/h94/IP-Adapter). For both SD1.5 and SDXL variants, use the CLIP vision encoder ([CLIP-H](https://huggingface.co/h94/IP-Adapter/tree/main/models/image_encoder))
You may need to lower the CFG to around 3 for best results, especially on the SDXL variant.
### How is it different from control nets?
Control nets are more rigid. A control net will spatially align an image to nearly perfectly match the control image. The composition adapter allows the control to be more flexible.
## SDXL Examples
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20195340.png" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20194130.png" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20193948.png" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20193802.png" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20193632.png" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20192659.png" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%202024-03-19%20192445.png" alt="1" width="100%"/>
## SD 1.5 Examples
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2013-06-32.jpg" alt="1" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2013-09-57.jpg" alt="2" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2013-11-27.jpg" alt="3" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2013-13-19.jpg" alt="4" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2013-56-51.jpg" alt="5" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-00-31.jpg" alt="6" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-04-41.jpg" alt="7" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-09-31.jpg" alt="8" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-11-10.jpg" alt="9" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-13-26.jpg" alt="10" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-19-20.jpg" alt="11" width="100%"/>
<img src="https://huggingface.co/ostris/ip-composition-adapter/resolve/main/resources/Screenshot%20from%202024-03-16%2014-21-50.jpg?download=true" alt="12" width="100%"/>

1
configuration.json Normal file
View File

@@ -0,0 +1 @@
{"framework": "pytorch", "task": "text-image", "allow_remote": true}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a02c9f4d2ade7c0e14db7471377ce5d326a2bfda7777231c79dc861c93f2c12
size 98183728

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e92dc36cc273bac3200b2e41807ebdc174076185d95a45238558d4c236b6da74
size 847517960

0
resources/.gitkeep Normal file
View File

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4624896f520fe5c48099bb2c53bc58fe26b7cd6a9bbcd68dfe1f3c39f184d54f
size 1560310

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:72f7a718b680ab5fef81e711e8e759a8569d00cec2543bf07bf2b973d1b37c73
size 1202580

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:88ac35a92f9e4d8ec4546c4c49eee49fc2e0c62e32967efe8eddfefb8d3d4f06
size 1198198

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2f1b31833a31f4c3adb305fe478647e54f379db28c24e5bfddfef672f9c430b1
size 1262140

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:57228df0776313c8b953914911da8104d24efd7da24bdfe92e2e7aaedaa5f400
size 1209228

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c831d8a7312410bd6b0909bf15b518c1fb2b4594ab428c210f0a3ebf41999808
size 1236665

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:67fb6e10398a1e0d66a0b34ab6a8716ce0d045dc5d45d7a6b000ebdb1c88800b
size 1027899

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB