File size: 3,013 Bytes
64c5b4e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
license: apache-2.0
datasets:
- LucidityAI/meisho-sft
tags:
- image-generation
---
# Meisho-S1-Preview

A Meisho S1 Preview is a generalist image-generation model based on [Tongyi-MAI/Z-Image](https://huggingface.co/Tongyi-MAI/Z-Image), finetuned on our [LucidityAI/meisho-sft dataset](https://huggingface.co/LucidityAI/meisho-sft)

Compared to it's base model, Meisho-S1-Preview handles areas like typography better, while having regressions in other places (see limitations), which we aim to resolve and surpass the base-model at in a later version, whether it be in a second version of a preview or the final S1 version, among the possibility of splitting Meisho into flash and pro versions, like our Synth 2.5 family.


## Usage

You may use Meisho S1 Preview like so:

```python
import torch
from diffsynth.pipelines.z_image import ZImagePipeline, ModelConfig

pipe = ZImagePipeline.from_pretrained(
    torch_dtype=torch.bfloat16,
    device="cuda",
    model_configs=[
        ModelConfig(path=["<repo>/transformer/diffusion_pytorch_model-00001-of-00002.safetensors",
                          "<repo>/transformer/diffusion_pytorch_model-00002-of-00002.safetensors"]),
        ModelConfig(path=["<repo>/text_encoder/model-0000{}-of-00003.safetensors".format(i) for i in (1,2,3)]),
        ModelConfig(path="<repo>/vae/diffusion_pytorch_model.safetensors"),
    ],
    tokenizer_config=ModelConfig(path="LucidityAI/Meisho-S1-Preview/tokenizer"),
)

image = pipe(
    prompt="...",
    seed=1234, rand_device="cuda",
    num_inference_steps=50, cfg_scale=4.0,
    height=1024, width=1024,
)
```

Recommended settings: `num_inference_steps=50`, `cfg_scale=4.0`, 1024×1024. This is a
non-distilled base model, so it needs the full step count, unlike Z-Image-Turbo.

## Examples

<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_05_character_sheet.jpg">
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_10_type_poster.jpg">
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_12_food_flatlay.jpg">
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_11_color_palette.jpg">

## Limitations

The preview version of Meisho-S1 struggles with:

- Detail
- Clothing
- Photorealistic people

## Examples of Limitations

<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_02_cafe_girl.jpg">
<img style="height: 350px;"  src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_14_sprinter_bw.jpg">
<img style="height: 350px;"  src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_04_magic_study.jpg">
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_15_knit_macro.jpg">