Instructions to use KawaiiApp/anythinv3-vae-handler with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use KawaiiApp/anythinv3-vae-handler with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("KawaiiApp/anythinv3-vae-handler", 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
added to pipe
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -20,7 +20,7 @@ class EndpointHandler():
|
|
| 20 |
def __init__(self, path=""):
|
| 21 |
# load the optimized model
|
| 22 |
self.pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16,low_cpu_mem_usage=False)
|
| 23 |
-
self.
|
| 24 |
self.pipe = self.pipe.to(device)
|
| 25 |
|
| 26 |
|
|
|
|
| 20 |
def __init__(self, path=""):
|
| 21 |
# load the optimized model
|
| 22 |
self.pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16,low_cpu_mem_usage=False)
|
| 23 |
+
self.pipe.scheduler = EulerDiscreteScheduler.from_config(self.pipe.scheduler.config)
|
| 24 |
self.pipe = self.pipe.to(device)
|
| 25 |
|
| 26 |
|