Update model card: add zen/zenlm tags, fix branding
Browse files
README.md
CHANGED
|
@@ -1,58 +1,39 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
-
base_model: zenlm/zen-image-edit
|
| 4 |
tags:
|
| 5 |
-
- image-
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
- zen
|
| 12 |
-
- zenlm
|
| 13 |
-
- hanzo
|
| 14 |
-
language:
|
| 15 |
-
- en
|
| 16 |
-
- zh
|
| 17 |
pipeline_tag: image-to-image
|
| 18 |
library_name: diffusers
|
| 19 |
---
|
| 20 |
|
| 21 |
# Zen Image Edit
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
## Overview
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- Object manipulation: Add, remove, or move objects seamlessly
|
| 29 |
-
- Style transfer: Apply artistic styles and filters
|
| 30 |
-
- Background editing: Replace or modify backgrounds
|
| 31 |
-
- Facial editing: Adjust expressions and features
|
| 32 |
-
- Resolution: Up to 1024x1024
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
|
| 36 |
```python
|
| 37 |
-
from diffusers import
|
| 38 |
-
from PIL import Image
|
| 39 |
import torch
|
| 40 |
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
torch_dtype=torch.bfloat16,
|
| 44 |
-
trust_remote_code=True,
|
| 45 |
-
)
|
| 46 |
pipe = pipe.to("cuda")
|
| 47 |
|
| 48 |
-
image =
|
| 49 |
-
|
| 50 |
-
image=image,
|
| 51 |
-
prompt="Remove the car and replace with trees",
|
| 52 |
-
height=1024,
|
| 53 |
-
width=1024,
|
| 54 |
-
).images[0]
|
| 55 |
-
edited.save("output.jpg")
|
| 56 |
```
|
| 57 |
|
| 58 |
## API Access
|
|
@@ -60,26 +41,24 @@ edited.save("output.jpg")
|
|
| 60 |
```python
|
| 61 |
from openai import OpenAI
|
| 62 |
|
| 63 |
-
client = OpenAI(
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
response = client.images.edit(
|
| 69 |
-
model='zen-image-edit',
|
| 70 |
-
image=open('input.jpg', 'rb'),
|
| 71 |
-
prompt='Remove the car and replace with trees',
|
| 72 |
-
size='1024x1024',
|
| 73 |
)
|
| 74 |
print(response.data[0].url)
|
| 75 |
```
|
| 76 |
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
## License
|
| 80 |
|
| 81 |
Apache 2.0
|
| 82 |
-
|
| 83 |
-
---
|
| 84 |
-
|
| 85 |
-
*Zen LM is developed by [Hanzo AI](https://hanzo.ai) — Frontier AI infrastructure.*
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
license: apache-2.0
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- image-to-image
|
| 6 |
+
- zen
|
| 7 |
+
- zenlm
|
| 8 |
+
- hanzo
|
| 9 |
+
- image-editing
|
| 10 |
+
- diffusion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
pipeline_tag: image-to-image
|
| 12 |
library_name: diffusers
|
| 13 |
---
|
| 14 |
|
| 15 |
# Zen Image Edit
|
| 16 |
|
| 17 |
+
Instruction-following image editing model for targeted modifications and inpainting.
|
| 18 |
|
| 19 |
## Overview
|
| 20 |
|
| 21 |
+
Built on **Zen MoDE (Mixture of Distilled Experts)** architecture with 7B parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
Developed by [Hanzo AI](https://hanzo.ai) and the [Zoo Labs Foundation](https://zoo.ngo).
|
| 24 |
+
|
| 25 |
+
## Quick Start
|
| 26 |
|
| 27 |
```python
|
| 28 |
+
from diffusers import AutoPipelineForText2Image
|
|
|
|
| 29 |
import torch
|
| 30 |
|
| 31 |
+
model_id = "zenlm/zen-image-edit"
|
| 32 |
+
pipe = AutoPipelineForText2Image.from_pretrained(model_id, torch_dtype=torch.bfloat16)
|
|
|
|
|
|
|
|
|
|
| 33 |
pipe = pipe.to("cuda")
|
| 34 |
|
| 35 |
+
image = pipe("A serene mountain landscape at sunset, photorealistic").images[0]
|
| 36 |
+
image.save("output.png")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
```
|
| 38 |
|
| 39 |
## API Access
|
|
|
|
| 41 |
```python
|
| 42 |
from openai import OpenAI
|
| 43 |
|
| 44 |
+
client = OpenAI(base_url="https://api.hanzo.ai/v1", api_key="your-api-key")
|
| 45 |
+
response = client.images.generate(
|
| 46 |
+
model="zen-image-edit",
|
| 47 |
+
prompt="A serene mountain landscape at sunset",
|
| 48 |
+
size="1024px",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
)
|
| 50 |
print(response.data[0].url)
|
| 51 |
```
|
| 52 |
|
| 53 |
+
## Model Details
|
| 54 |
+
|
| 55 |
+
| Attribute | Value |
|
| 56 |
+
|-----------|-------|
|
| 57 |
+
| Parameters | 7B |
|
| 58 |
+
| Architecture | Zen MoDE |
|
| 59 |
+
| Max Resolution | 1024px |
|
| 60 |
+
| License | Apache 2.0 |
|
| 61 |
|
| 62 |
## License
|
| 63 |
|
| 64 |
Apache 2.0
|
|
|
|
|
|
|
|
|
|
|
|