Instructions to use keras/stable_diffusion_3.5_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use keras/stable_diffusion_3.5_large 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.5_large", 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.5_large")import keras_hub # Create a Inpaint model task = keras_hub.models.Inpaint.from_preset("hf://keras/stable_diffusion_3.5_large")import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://keras/stable_diffusion_3.5_large") - Keras
How to use keras/stable_diffusion_3.5_large 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.5_large") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- config.json +2 -2
- metadata.json +8 -3
config.json
CHANGED
|
@@ -65,7 +65,7 @@
|
|
| 65 |
"intermediate_output_index": 10,
|
| 66 |
"max_sequence_length": 77
|
| 67 |
},
|
| 68 |
-
"registered_name": "CLIPTextEncoder"
|
| 69 |
},
|
| 70 |
"clip_g": {
|
| 71 |
"module": "keras_hub.src.models.clip.clip_text_encoder",
|
|
@@ -83,7 +83,7 @@
|
|
| 83 |
"intermediate_output_index": 30,
|
| 84 |
"max_sequence_length": 77
|
| 85 |
},
|
| 86 |
-
"registered_name": "CLIPTextEncoder"
|
| 87 |
},
|
| 88 |
"t5": null,
|
| 89 |
"latent_channels": 16,
|
|
|
|
| 65 |
"intermediate_output_index": 10,
|
| 66 |
"max_sequence_length": 77
|
| 67 |
},
|
| 68 |
+
"registered_name": "keras_hub>CLIPTextEncoder"
|
| 69 |
},
|
| 70 |
"clip_g": {
|
| 71 |
"module": "keras_hub.src.models.clip.clip_text_encoder",
|
|
|
|
| 83 |
"intermediate_output_index": 30,
|
| 84 |
"max_sequence_length": 77
|
| 85 |
},
|
| 86 |
+
"registered_name": "keras_hub>CLIPTextEncoder"
|
| 87 |
},
|
| 88 |
"t5": null,
|
| 89 |
"latent_channels": 16,
|
metadata.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
{
|
| 2 |
-
"keras_version": "3.
|
| 3 |
-
"keras_hub_version": "0.
|
| 4 |
"parameter_count": 9048410595,
|
| 5 |
-
"date_saved": "2024-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"keras_version": "3.7.0",
|
| 3 |
+
"keras_hub_version": "0.19.0",
|
| 4 |
"parameter_count": 9048410595,
|
| 5 |
+
"date_saved": "2024-12-21@22:31:36",
|
| 6 |
+
"tasks": [
|
| 7 |
+
"ImageToImage",
|
| 8 |
+
"Inpaint",
|
| 9 |
+
"TextToImage"
|
| 10 |
+
]
|
| 11 |
}
|