Text-to-Image
Transformers
English
SupraDiT
feature-extraction
small
supra
image
flux
img
t2i
from scratch
custom_code
Instructions to use SupraLabs/Supra2-IMG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SupraLabs/Supra2-IMG with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("SupraLabs/Supra2-IMG", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -88,7 +88,37 @@ The training ran on a single Nvidia H100 SXM 80GB Runpod Pod for 9 hours (incl.
|
|
| 88 |
|
| 89 |
---
|
| 90 |
|
| 91 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
---
|
| 94 |
|
|
|
|
| 88 |
|
| 89 |
---
|
| 90 |
|
| 91 |
+
## How to run the model
|
| 92 |
+
|
| 93 |
+
You can our demo space on HF [here](https://huggingface.co/spaces/LH-Tech-AI/Supra2-IMG-Demo) or you can run the model on your own hardware:
|
| 94 |
+
<br><br>
|
| 95 |
+
First, run:
|
| 96 |
+
```bash
|
| 97 |
+
# Create project directory
|
| 98 |
+
mkdir Supra2-IMG
|
| 99 |
+
cd Supra2-IMG
|
| 100 |
+
|
| 101 |
+
# Download the inference script
|
| 102 |
+
wget https://huggingface.co/SupraLabs/Supra2-IMG/resolve/main/inference.py
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
Then, you can generate images by running:
|
| 106 |
+
```bash
|
| 107 |
+
python inference.py --prompt "a sea jellyfish floating in the pitch-black ocean depths" --seed 0 --cfg 3.0 --steps 50 --n 1 --out jellyfish.png
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
### Recommended settings for sampling
|
| 111 |
+
|
| 112 |
+
- `--seed`: 0
|
| 113 |
+
- `--cfg`: 3.0
|
| 114 |
+
- `--steps`: 50
|
| 115 |
+
|
| 116 |
+
### Expected Output
|
| 117 |
+
|
| 118 |
+
The script will output something like:
|
| 119 |
+
```bash
|
| 120 |
+
|
| 121 |
+
```
|
| 122 |
|
| 123 |
---
|
| 124 |
|