Diffusers
English
stable-diffusion
stable-diffusion-diffusers
inpainting
art
artistic
anime
absolute-realism
Instructions to use diffusers/tools with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use diffusers/tools with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("diffusers/tools", 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
Commit ·
777e804
1
Parent(s): 27dfa17
renaming
Browse files- benchmark_llama.py +1 -1
benchmark_llama.py
CHANGED
|
@@ -45,7 +45,7 @@ for batch_size in (1, 16):
|
|
| 45 |
times = []
|
| 46 |
for _ in range(3):
|
| 47 |
start_time = time.time()
|
| 48 |
-
out = model.generate(input_ids=input_ids, max_new_tokens=256)
|
| 49 |
times.append(time.time() - start_time)
|
| 50 |
|
| 51 |
result = min(times)
|
|
|
|
| 45 |
times = []
|
| 46 |
for _ in range(3):
|
| 47 |
start_time = time.time()
|
| 48 |
+
out = model.generate(input_ids=input_ids, max_new_tokens=256, do_sample=False)
|
| 49 |
times.append(time.time() - start_time)
|
| 50 |
|
| 51 |
result = min(times)
|