Instructions to use dataset-viber/stable-diffusion-v1-4-smashed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use dataset-viber/stable-diffusion-v1-4-smashed with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("dataset-viber/stable-diffusion-v1-4-smashed", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Pruna AI
How to use dataset-viber/stable-diffusion-v1-4-smashed with Pruna AI:
from pruna import PrunaModel pip install -U diffusers transformers accelerate
from pruna import PrunaModel import torch # switch to "mps" for apple devices pipe = PrunaModel.from_pretrained("dataset-viber/stable-diffusion-v1-4-smashed", 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 Settings
- Draw Things
- DiffusionBee
Add files using upload-large-folder tool
Browse files- README.md +6 -5
- dtype_info.json +1 -0
README.md
CHANGED
|
@@ -13,7 +13,7 @@ This model was created using the [pruna](https://github.com/PrunaAI/pruna) libra
|
|
| 13 |
First things first, you need to install the pruna library:
|
| 14 |
|
| 15 |
```bash
|
| 16 |
-
pip install
|
| 17 |
```
|
| 18 |
|
| 19 |
You can then load this model using the following code:
|
|
@@ -21,9 +21,7 @@ You can then load this model using the following code:
|
|
| 21 |
```python
|
| 22 |
from pruna import PrunaModel
|
| 23 |
|
| 24 |
-
loaded_model = PrunaModel.from_hub(
|
| 25 |
-
"dataset-viber/stable-diffusion-v1-4-smashed"
|
| 26 |
-
)
|
| 27 |
```
|
| 28 |
|
| 29 |
After loading the model, you can use the inference methods of the original model.
|
|
@@ -58,7 +56,7 @@ The compression configuration of the model is stored in the `smash_config.json`
|
|
| 58 |
|
| 59 |
## Model Configuration
|
| 60 |
|
| 61 |
-
The configuration of the model is stored in the `
|
| 62 |
|
| 63 |
```bash
|
| 64 |
{
|
|
@@ -99,6 +97,9 @@ The configuration of the model is stored in the `*.json` files.
|
|
| 99 |
"diffusers",
|
| 100 |
"AutoencoderKL"
|
| 101 |
]
|
|
|
|
|
|
|
|
|
|
| 102 |
}
|
| 103 |
}
|
| 104 |
```
|
|
|
|
| 13 |
First things first, you need to install the pruna library:
|
| 14 |
|
| 15 |
```bash
|
| 16 |
+
pip install pruna
|
| 17 |
```
|
| 18 |
|
| 19 |
You can then load this model using the following code:
|
|
|
|
| 21 |
```python
|
| 22 |
from pruna import PrunaModel
|
| 23 |
|
| 24 |
+
loaded_model = PrunaModel.from_hub("dataset-viber/stable-diffusion-v1-4-smashed")
|
|
|
|
|
|
|
| 25 |
```
|
| 26 |
|
| 27 |
After loading the model, you can use the inference methods of the original model.
|
|
|
|
| 56 |
|
| 57 |
## Model Configuration
|
| 58 |
|
| 59 |
+
The configuration of the model is stored in the `config.json` file.
|
| 60 |
|
| 61 |
```bash
|
| 62 |
{
|
|
|
|
| 97 |
"diffusers",
|
| 98 |
"AutoencoderKL"
|
| 99 |
]
|
| 100 |
+
},
|
| 101 |
+
"dtype_info": {
|
| 102 |
+
"dtype": "float32"
|
| 103 |
}
|
| 104 |
}
|
| 105 |
```
|
dtype_info.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"dtype": "float32"}
|