xtristan commited on
Commit
3b631bd
1 Parent(s): 6c6ac9e

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -0
README.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: diffusers
6
+ pipeline_tag: text-to-image
7
+ tags:
8
+ - text-to-image
9
+ - image-generation
10
+ - shuttle
11
+ ---
12
+
13
+ # Shuttle 3 Diffusion
14
+
15
+ Shuttle 3 Diffusion is a text-to-image AI model designed to create detailed and diverse images from textual prompts. It offers enhanced performance in image quality, typography, understanding complex prompts, and resource efficiency.
16
+
17
+ ## Using the model via API
18
+ You can use Shuttle 3 Diffusion via API through ShuttleAI
19
+ - [ShuttleAI](https://shuttleai.com/)
20
+ - [ShuttleAI Docs](https://docs.shuttleai.com/)
21
+
22
+ ## Using the model with 🧨 Diffusers
23
+ Install or upgrade diffusers
24
+ ```shell
25
+ pip install -U diffusers
26
+ ```
27
+ Then you can use `DiffusionPipeline` to run the model
28
+ ```python
29
+ import torch
30
+ from diffusers import DiffusionPipeline
31
+
32
+ # Load the diffusion pipeline from a pretrained model, using bfloat16 for tensor types.
33
+ pipe = DiffusionPipeline.from_pretrained(
34
+ "shuttleai/shuttle-3-diffusion", torch_dtype=torch.bfloat16
35
+ ).to("cuda")
36
+
37
+ # Uncomment the following line to save VRAM by offloading the model to CPU if needed.
38
+ # pipe.enable_model_cpu_offload()
39
+
40
+ # Uncomment the lines below to enable torch.compile for potential performance boosts on compatible GPUs.
41
+ # Note that this can increase loading times considerably.
42
+ # pipe.transformer.to(memory_format=torch.channels_last)
43
+ # pipe.transformer = torch.compile(
44
+ # pipe.transformer, mode="max-autotune", fullgraph=True
45
+ # )
46
+
47
+ # Set your prompt for image generation.
48
+ prompt = "A cat holding a sign that says hello world"
49
+
50
+ # Generate the image using the diffusion pipeline.
51
+ image = pipe(
52
+ prompt,
53
+ height=1024,
54
+ width=1024,
55
+ guidance_scale=3.5,
56
+ num_inference_steps=4,
57
+ max_sequence_length=256,
58
+ # Uncomment the line below to use a manual seed for reproducible results.
59
+ # generator=torch.Generator("cpu").manual_seed(0)
60
+ ).images[0]
61
+
62
+ # Save the generated image.
63
+ image.save("shuttle.png")
64
+ ```
65
+ To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
66
+
67
+ ## Using the model with Automatic1111/ComfyUI
68
+
69
+ Support coming soon. We will update this model card with instructions when ready.
70
+
71
+ ## Comparison to other models
72
+ Shuttle 3 Diffusion can produce better images than Flux Dev in just four steps, while being licensed under Apache 2.
73
+ ![image/png](https://huggingface.co/shuttleai/shuttle-3-diffusion/resolve/main/comparison.png)
74
+
75
+ ## Training Details
76
+ Shuttle 3 Diffusion uses Flux.1 Schnell as its base. It can produce images similar to Flux 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.