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-base 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-base with TF-Keras:
# Note: 'keras<3.x' or 'tf_keras' must be installed (legacy), and from_pretrained_keras was removed in huggingface_hub 1.0. # See https://github.com/keras-team/tf-keras for more details. # !pip install "huggingface_hub<1.0" tf_keras from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("nielsgl/dreambooth-pug-ace-sd2.1-base") - Keras
How to use nielsgl/dreambooth-pug-ace-sd2.1-base with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://nielsgl/dreambooth-pug-ace-sd2.1-base") - Diffusers
How to use nielsgl/dreambooth-pug-ace-sd2.1-base 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-base", dtype=torch.bfloat16, device_map="cuda") prompt = "a photo of puggieace dog on the beach" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Set `library_name` to `tf-keras`.
#1 opened over 2 years ago
by
Wauplin