Instructions to use glowforge-dev/stable-diffusion-2-1-base-custom with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use glowforge-dev/stable-diffusion-2-1-base-custom with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("glowforge-dev/stable-diffusion-2-1-base-custom", 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
- Draw Things
- DiffusionBee
Remove unnecessary Image imports
Browse files- handler.py +0 -2
handler.py
CHANGED
|
@@ -1,8 +1,6 @@
|
|
| 1 |
from typing import Dict, List, Any
|
| 2 |
import torch
|
| 3 |
from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
|
| 4 |
-
from PIL import Image
|
| 5 |
-
|
| 6 |
|
| 7 |
# set device
|
| 8 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
|
| 1 |
from typing import Dict, List, Any
|
| 2 |
import torch
|
| 3 |
from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# set device
|
| 6 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|