Fizzarolli
commited on
Commit
•
225489f
1
Parent(s):
98f66e7
Update README.md
Browse files
README.md
CHANGED
@@ -29,55 +29,6 @@ You can use Shuttle 3 Diffusion via API through ShuttleAI
|
|
29 |
- [ShuttleAI](https://shuttleai.com/)
|
30 |
- [ShuttleAI Docs](https://docs.shuttleai.com/)
|
31 |
|
32 |
-
## Using the model with 🧨 Diffusers
|
33 |
-
Install or upgrade diffusers
|
34 |
-
```shell
|
35 |
-
pip install -U diffusers
|
36 |
-
```
|
37 |
-
Then you can use `DiffusionPipeline` to run the model
|
38 |
-
```python
|
39 |
-
import torch
|
40 |
-
from diffusers import DiffusionPipeline
|
41 |
-
|
42 |
-
# Load the diffusion pipeline from a pretrained model, using bfloat16 for tensor types.
|
43 |
-
pipe = DiffusionPipeline.from_pretrained(
|
44 |
-
"shuttleai/shuttle-3-diffusion", torch_dtype=torch.bfloat16
|
45 |
-
).to("cuda")
|
46 |
-
|
47 |
-
# Uncomment the following line to save VRAM by offloading the model to CPU if needed.
|
48 |
-
# pipe.enable_model_cpu_offload()
|
49 |
-
|
50 |
-
# Uncomment the lines below to enable torch.compile for potential performance boosts on compatible GPUs.
|
51 |
-
# Note that this can increase loading times considerably.
|
52 |
-
# pipe.transformer.to(memory_format=torch.channels_last)
|
53 |
-
# pipe.transformer = torch.compile(
|
54 |
-
# pipe.transformer, mode="max-autotune", fullgraph=True
|
55 |
-
# )
|
56 |
-
|
57 |
-
# Set your prompt for image generation.
|
58 |
-
prompt = "A cat holding a sign that says hello world"
|
59 |
-
|
60 |
-
# Generate the image using the diffusion pipeline.
|
61 |
-
image = pipe(
|
62 |
-
prompt,
|
63 |
-
height=1024,
|
64 |
-
width=1024,
|
65 |
-
guidance_scale=3.5,
|
66 |
-
num_inference_steps=4,
|
67 |
-
max_sequence_length=256,
|
68 |
-
# Uncomment the line below to use a manual seed for reproducible results.
|
69 |
-
# generator=torch.Generator("cpu").manual_seed(0)
|
70 |
-
).images[0]
|
71 |
-
|
72 |
-
# Save the generated image.
|
73 |
-
image.save("shuttle.png")
|
74 |
-
```
|
75 |
-
To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
|
76 |
-
|
77 |
-
## Using the model with ComfyUI
|
78 |
-
|
79 |
-
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).
|
80 |
-
|
81 |
## Comparison to other models
|
82 |
Shuttle 3 Diffusion can produce images better images than Flux Dev in just four steps, while being licensed under Apache 2.
|
83 |
![image/png](https://huggingface.co/shuttleai/shuttle-3-diffusion/resolve/main/comparison.png)
|
|
|
29 |
- [ShuttleAI](https://shuttleai.com/)
|
30 |
- [ShuttleAI Docs](https://docs.shuttleai.com/)
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
## Comparison to other models
|
33 |
Shuttle 3 Diffusion can produce images better images than Flux Dev in just four steps, while being licensed under Apache 2.
|
34 |
![image/png](https://huggingface.co/shuttleai/shuttle-3-diffusion/resolve/main/comparison.png)
|