Instructions to use LucidityAI/Meisho-S1-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use LucidityAI/Meisho-S1-Preview with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("LucidityAI/Meisho-S1-Preview", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
datasets:
|
| 4 |
+
- LucidityAI/meisho-sft
|
| 5 |
+
tags:
|
| 6 |
+
- image-generation
|
| 7 |
+
---
|
| 8 |
+
# Meisho-S1-Preview
|
| 9 |
+
|
| 10 |
+
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)
|
| 11 |
+
|
| 12 |
+
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.
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
## Usage
|
| 16 |
+
|
| 17 |
+
You may use Meisho S1 Preview like so:
|
| 18 |
+
|
| 19 |
+
```python
|
| 20 |
+
import torch
|
| 21 |
+
from diffsynth.pipelines.z_image import ZImagePipeline, ModelConfig
|
| 22 |
+
|
| 23 |
+
pipe = ZImagePipeline.from_pretrained(
|
| 24 |
+
torch_dtype=torch.bfloat16,
|
| 25 |
+
device="cuda",
|
| 26 |
+
model_configs=[
|
| 27 |
+
ModelConfig(path=["<repo>/transformer/diffusion_pytorch_model-00001-of-00002.safetensors",
|
| 28 |
+
"<repo>/transformer/diffusion_pytorch_model-00002-of-00002.safetensors"]),
|
| 29 |
+
ModelConfig(path=["<repo>/text_encoder/model-0000{}-of-00003.safetensors".format(i) for i in (1,2,3)]),
|
| 30 |
+
ModelConfig(path="<repo>/vae/diffusion_pytorch_model.safetensors"),
|
| 31 |
+
],
|
| 32 |
+
tokenizer_config=ModelConfig(path="LucidityAI/Meisho-S1-Preview/tokenizer"),
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
image = pipe(
|
| 36 |
+
prompt="...",
|
| 37 |
+
seed=1234, rand_device="cuda",
|
| 38 |
+
num_inference_steps=50, cfg_scale=4.0,
|
| 39 |
+
height=1024, width=1024,
|
| 40 |
+
)
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
Recommended settings: `num_inference_steps=50`, `cfg_scale=4.0`, 1024×1024. This is a
|
| 44 |
+
non-distilled base model, so it needs the full step count, unlike Z-Image-Turbo.
|
| 45 |
+
|
| 46 |
+
## Examples
|
| 47 |
+
|
| 48 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_05_character_sheet.jpg">
|
| 49 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_10_type_poster.jpg">
|
| 50 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_12_food_flatlay.jpg">
|
| 51 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_11_color_palette.jpg">
|
| 52 |
+
|
| 53 |
+
## Limitations
|
| 54 |
+
|
| 55 |
+
The preview version of Meisho-S1 struggles with:
|
| 56 |
+
|
| 57 |
+
- Detail
|
| 58 |
+
- Clothing
|
| 59 |
+
- Photorealistic people
|
| 60 |
+
|
| 61 |
+
## Examples of Limitations
|
| 62 |
+
|
| 63 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_02_cafe_girl.jpg">
|
| 64 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_14_sprinter_bw.jpg">
|
| 65 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_04_magic_study.jpg">
|
| 66 |
+
<img style="height: 350px;" src="https://huggingface.co/LucidityAI/Meisho-S1-Preview/resolve/main/samples/compare_15_knit_macro.jpg">
|