Instructions to use keras/stable_diffusion_3_medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/stable_diffusion_3_medium with KerasHub:
import keras_hub # Load TextToImage model (optional: use half precision for inference) text_to_image = keras_hub.models.TextToImage.from_preset("hf://keras/stable_diffusion_3_medium", dtype="bfloat16") # Generate images with a TextToImage model. text_to_image.generate("Astronaut in a jungle")import keras_hub # Create a ImageToImage model task = keras_hub.models.ImageToImage.from_preset("hf://keras/stable_diffusion_3_medium")import keras_hub # Create a Inpaint model task = keras_hub.models.Inpaint.from_preset("hf://keras/stable_diffusion_3_medium")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/stable_diffusion_3_medium") - Keras
How to use keras/stable_diffusion_3_medium with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://keras/stable_diffusion_3_medium") - Notebooks
- Google Colab
- Kaggle
Update README.md with new model card content
Browse files
README.md
CHANGED
|
@@ -5,7 +5,7 @@ tags:
|
|
| 5 |
- image-to-image
|
| 6 |
- keras
|
| 7 |
---
|
| 8 |
-
## Model Overview
|
| 9 |
# Stable Diffusion 3 Medium
|
| 10 |

|
| 11 |
|
|
@@ -273,4 +273,4 @@ text_to_image.generate(
|
|
| 273 |
"negative_prompts": "green color",
|
| 274 |
}
|
| 275 |
)
|
| 276 |
-
```
|
|
|
|
| 5 |
- image-to-image
|
| 6 |
- keras
|
| 7 |
---
|
| 8 |
+
### Model Overview
|
| 9 |
# Stable Diffusion 3 Medium
|
| 10 |

|
| 11 |
|
|
|
|
| 273 |
"negative_prompts": "green color",
|
| 274 |
}
|
| 275 |
)
|
| 276 |
+
```
|