Text-to-Image
TF-Keras
Keras
Diffusers
keras-cv
stable-diffusion
diffusion-models-class
dreambooth
nature
Instructions to use nielsgl/dreambooth-pug-ace-sd2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TF-Keras
How to use nielsgl/dreambooth-pug-ace-sd2.1 with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy) # See https://github.com/keras-team/tf-keras for more details. from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("nielsgl/dreambooth-pug-ace-sd2.1") - Keras
How to use nielsgl/dreambooth-pug-ace-sd2.1 with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://nielsgl/dreambooth-pug-ace-sd2.1") - Diffusers
How to use nielsgl/dreambooth-pug-ace-sd2.1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nielsgl/dreambooth-pug-ace-sd2.1", dtype=torch.bfloat16, device_map="cuda") prompt = "a photo of puggieace dog on the beach" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
DreamBooth model for the puggieace concept trained by nielsgl on the nielsgl/dreambooth-ace dataset.
This is a KerasCV Stable Diffusion V2.1 model fine-tuned on the puggieace concept with DreamBooth. It can be used by modifying the instance_prompt: a photo of puggieace
This model was created as part of the Keras DreamBooth Sprint 🔥. Visit the organisation page for instructions on how to take part!
Description
This is a KerasCV Stable Diffusion model fine-tuned on dog images for the nature theme.
Usage
from huggingface_hub import from_pretrained_keras
import keras_cv
import matplotlib.pyplot as plt
model = keras_cv.models.StableDiffusionV2(img_width=512, img_height=512, jit_compile=True)
model._diffusion_model = from_pretrained_keras(nielsgl/dreambooth-pug-ace-sd2.1)
model._text_encoder = from_pretrained_keras(nielsgl/dreambooth-pug-ace-sd2.1-text-encoder)
images = model.text_to_image("a photo of puggieace dog on the beach", batch_size=3)
plt.imshow(image[0])
Training hyperparameters
The following hyperparameters were used during training:
| Hyperparameters | Value |
|---|---|
| name | RMSprop |
| weight_decay | None |
| clipnorm | None |
| global_clipnorm | None |
| clipvalue | None |
| use_ema | False |
| ema_momentum | 0.99 |
| ema_overwrite_frequency | 100 |
| jit_compile | True |
| is_legacy_optimizer | False |
| learning_rate | 0.0010000000474974513 |
| rho | 0.9 |
| momentum | 0.0 |
| epsilon | 1e-07 |
| centered | False |
| training_precision | float32 |
- Downloads last month
- 3