Instructions to use UX4567/Stable-Diffusion-v1-3.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use UX4567/Stable-Diffusion-v1-3.0 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("UX4567/Stable-Diffusion-v1-3.0", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
|
Download README.md from UX4567/Stable-Diffusion-v1-3.0: direct link, hf CLI and curl.
- Browser
- Download file 1.54 kB
-
https://huggingface.co/UX4567/Stable-Diffusion-v1-3.0/resolve/main/README.md
- Command line
-
hf download hf://UX4567/Stable-Diffusion-v1-3.0/README.md
-
curl -L -o README.md https://huggingface.co/UX4567/Stable-Diffusion-v1-3.0/resolve/main/README.md
1.54 kB
| license: mit | |
| base_model: runwayml/stable-diffusion-v1-5 | |
| tags: | |
| - stable-diffusion | |
| - text-to-image | |
| - diffusers | |
| - pytorch | |
| - fine-tuned-unet | |
| inference: true | |
| # Stable Diffusion v1-3.0 (Fine-Tuned UNet) | |
| This repository contains fine-tuned **UNet** weights for Stable Diffusion v1.5, trained by [UX4567](https://huggingface.co/UX4567). | |
| ## Model Details | |
| - **Base Model:** [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) | |
| - **Model Type:** Text-to-Image Diffusion (UNet component) | |
| - **Training Environment:** Google Colab (T4 GPU) | |
| - **Precision:** FP16 / 8-bit Adam optimization (`bitsandbytes`) | |
| ## How to Use | |
| Because this repository stores the fine-tuned UNet weights, you can easily load it using the `diffusers` library by injecting it into the base Stable Diffusion pipeline: | |
| ```python | |
| import torch | |
| from diffusers import StableDiffusionPipeline, UNet2DConditionModel | |
| model_id = "UX4567/Stable-Diffusion-v1-3.0" | |
| device = "cuda" if torch.cuda.is_available() else "cpu" | |
| # 1. Load your fine-tuned UNet in float16 | |
| trained_unet = UNet2DConditionModel.from_pretrained( | |
| model_id, | |
| torch_dtype=torch.float16 | |
| ) | |
| # 2. Initialize pipeline with runwayml base and your custom UNet | |
| pipe = StableDiffusionPipeline.from_pretrained( | |
| "runwayml/stable-diffusion-v1-5", | |
| unet=trained_unet, | |
| torch_dtype=torch.float16 | |
| ).to(device) | |
| # 3. Generate an image | |
| prompt = "a futuristic cyberpunk city at night" | |
| image = pipe(prompt, num_inference_steps=30).images[0] | |
| image.save("generated_image.png") |