Instructions to use amd/Nitro-T-1.2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use amd/Nitro-T-1.2B with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("amd/Nitro-T-1.2B", 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
- Draw Things
- DiffusionBee
Update pipeline.py
Browse files- pipeline.py +1 -1
pipeline.py
CHANGED
|
@@ -45,7 +45,7 @@ def calculate_shift(
|
|
| 45 |
return mu
|
| 46 |
|
| 47 |
|
| 48 |
-
class
|
| 49 |
model_cpu_offload_seq = "text_encoder->transformer->vae"
|
| 50 |
_callback_tensor_inputs = ["latents", "prompt_embeds", "negative_prompt_embeds"]
|
| 51 |
|
|
|
|
| 45 |
return mu
|
| 46 |
|
| 47 |
|
| 48 |
+
class NitroMMDiTPipeline(DiffusionPipeline, FromSingleFileMixin):
|
| 49 |
model_cpu_offload_seq = "text_encoder->transformer->vae"
|
| 50 |
_callback_tensor_inputs = ["latents", "prompt_embeds", "negative_prompt_embeds"]
|
| 51 |
|