Instructions to use isatis/kw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use isatis/kw with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("isatis/kw", 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
remove memory speed xformers
Browse files- handler.py +2 -2
handler.py
CHANGED
|
@@ -119,8 +119,8 @@ class EndpointHandler:
|
|
| 119 |
)
|
| 120 |
|
| 121 |
# boosts performance by another 20%
|
| 122 |
-
self.pipe.enable_xformers_memory_efficient_attention()
|
| 123 |
-
self.pipe.enable_attention_slicing()
|
| 124 |
|
| 125 |
def load_lora(self, pipeline, lora_path, lora_weight=0.5):
|
| 126 |
state_dict = load_file(lora_path)
|
|
|
|
| 119 |
)
|
| 120 |
|
| 121 |
# boosts performance by another 20%
|
| 122 |
+
# self.pipe.enable_xformers_memory_efficient_attention()
|
| 123 |
+
# self.pipe.enable_attention_slicing()
|
| 124 |
|
| 125 |
def load_lora(self, pipeline, lora_path, lora_weight=0.5):
|
| 126 |
state_dict = load_file(lora_path)
|