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
Adjust base64 encoding logic
Browse files- handler.py +1 -0
handler.py
CHANGED
|
@@ -28,6 +28,7 @@ class EndpointHandler():
|
|
| 28 |
A :obj:`dict`:. base64 encoded image
|
| 29 |
"""
|
| 30 |
inputs = data.pop("inputs", data)
|
|
|
|
| 31 |
params = data.pop("parameters", data)
|
| 32 |
|
| 33 |
# hyperparamters
|
|
|
|
| 28 |
A :obj:`dict`:. base64 encoded image
|
| 29 |
"""
|
| 30 |
inputs = data.pop("inputs", data)
|
| 31 |
+
encoded_image = data.pop("image", None)
|
| 32 |
params = data.pop("parameters", data)
|
| 33 |
|
| 34 |
# hyperparamters
|