Text-to-image Generation Models (Diffusion, LCM...)
Collection
57 items
•
Updated
•
7
Important remarks:
You can run the smashed model with these steps:
nvcc --version
and install with conda install nvidia/label/cuda-12.1.0::cuda
. For packaging and torch, run pip install packaging torch
.pruna-engine
available here on Pypi. It might take 15 minutes to install.pip install pruna-engine[gpu] --extra-index-url https://pypi.nvidia.com --extra-index-url https://pypi.ngc.nvidia.com --extra-index-url https://prunaai.pythonanywhere.com/
mkdir stabilityai-stable-diffusion-xl-base-1.0-turbo-green-smashed
huggingface-cli download PrunaAI/stabilityai-stable-diffusion-xl-base-1.0-turbo-green-smashed --local-dir stabilityai-stable-diffusion-xl-base-1.0-turbo-green-smashed --local-dir-use-symlinks False
import subprocess
repo_name = "stabilityai-stable-diffusion-xl-base-1.0-turbo-green-smashed"
subprocess.run(["mkdir", repo_name])
subprocess.run(["huggingface-cli", "download", 'PrunaAI/'+ repo_name, "--local-dir", repo_name, "--local-dir-use-symlinks", "False"])
from pruna_engine.PrunaModel import PrunaModel
model_path = "stabilityai-stable-diffusion-xl-base-1.0-turbo-green-smashed/model" # Specify the downloaded model path.
smashed_model = PrunaModel.load_model(model_path) # Load the model.
smashed_model(prompt='Beautiful fruits in trees', height=1024, width=1024)[0][0] # Run the model where x is the expected input of.
The configuration info are in config.json
.
We follow the same license as the original model. Please check the license of the original model stabilityai/stable-diffusion-xl-base-1.0 before using this model.