File size: 4,550 Bytes
3b631bd 0e34000 3b631bd 7b614c4 1676449 0e34000 7cc2aee e3a9756 3b631bd 207ccae 3b631bd e3a9756 3b631bd e3a9756 3b631bd e3a9756 3b631bd e3a9756 3b631bd e3a9756 |
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
---
language:
- en
license: apache-2.0
library_name: diffusers
pipeline_tag: text-to-image
tags:
- text-to-image
- image-generation
- shuttle
widget:
- text: >-
Venus floating market at dawn, fantasy digital art, highly detailed, atmospheric lighting with film-like light leaks, impressive background, studio photo style, cinematic, intricate details.
output:
url: gallery/1.webp
- text: >-
Silent forest, sun barely piercing treetops, mysterious lake turns dark red at dawn, reflecting colorful sky. Lone tree on shore with diamond-like dewdrops, photorealistic.
output:
url: gallery/2.webp
- text: >-
A beautiful photo showcases a night waterfall in the jungle, illuminated with a subtle blue tint that adds an ethereal touch. Fireflies float delicately around, their gentle glow enhancing the magical ambiance of the scene.
output:
url: gallery/3.webp
instance_prompt: null
---
# Shuttle 3 Diffusion
Join our [Discord](https://discord.gg/shuttleai) to get the latest updates, news, and more.
<Gallery />
## Model Variants
These model variants provide different precision levels and formats optimized for diverse hardware capabilities and use cases
- [bfloat16](https://huggingface.co/shuttleai/shuttle-3-diffusion)
- [GGUF](https://huggingface.co/shuttleai/shuttle-3-diffusion-GGUF)
- [fp8](https://huggingface.co/shuttleai/shuttle-3-diffusion-fp8)
Shuttle 3 Diffusion is a text-to-image AI model designed to create detailed and diverse images from textual prompts in just 4 steps. It offers enhanced performance in image quality, typography, understanding complex prompts, and resource efficiency.
![image/png](https://huggingface.co/shuttleai/shuttle-3-diffusion/resolve/main/demo.png)
You can try out the model through a website at https://chat.shuttleai.com/images
## Using the model via API
You can use Shuttle 3 Diffusion via API through ShuttleAI
- [ShuttleAI](https://shuttleai.com/)
- [ShuttleAI Docs](https://docs.shuttleai.com/)
## Using the model with 🧨 Diffusers
Install or upgrade diffusers
```shell
pip install -U diffusers
```
Then you can use `DiffusionPipeline` to run the model
```python
import torch
from diffusers import DiffusionPipeline
# Load the diffusion pipeline from a pretrained model, using bfloat16 for tensor types.
pipe = DiffusionPipeline.from_pretrained(
"shuttleai/shuttle-3-diffusion", torch_dtype=torch.bfloat16
).to("cuda")
# Uncomment the following line to save VRAM by offloading the model to CPU if needed.
# pipe.enable_model_cpu_offload()
# Uncomment the lines below to enable torch.compile for potential performance boosts on compatible GPUs.
# Note that this can increase loading times considerably.
# pipe.transformer.to(memory_format=torch.channels_last)
# pipe.transformer = torch.compile(
# pipe.transformer, mode="max-autotune", fullgraph=True
# )
# Set your prompt for image generation.
prompt = "A cat holding a sign that says hello world"
# Generate the image using the diffusion pipeline.
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=3.5,
num_inference_steps=4,
max_sequence_length=256,
# Uncomment the line below to use a manual seed for reproducible results.
# generator=torch.Generator("cpu").manual_seed(0)
).images[0]
# Save the generated image.
image.save("shuttle.png")
```
To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
## Using the model with ComfyUI
To run local inference with Shuttle 3 Diffusion using [ComfyUI](https://github.com/comfyanonymous/ComfyUI), you can use this [safetensors file](https://huggingface.co/shuttleai/shuttle-3-diffusion/blob/main/shuttle-3-diffusion.safetensors).
## Comparison to other models
Shuttle 3 Diffusion can produce images better images than Flux Dev in just four steps, while being licensed under Apache 2.
![image/png](https://huggingface.co/shuttleai/shuttle-3-diffusion/resolve/main/comparison.png)
[More examples](https://docs.shuttleai.com/getting-started/shuttle-diffusion)
## Training Details
Shuttle 3 Diffusion uses Flux.1 Schnell as its base. It can produce images similar to Flux Dev or Pro in just 4 steps, and it is licensed under Apache 2. The model was partially de-distilled during training. When used beyond 10 steps, it enters "refiner mode," enhancing image details without altering the composition. We overcame the limitations of the Schnell-series models by employing a special training method, resulting in improved details and colors. |