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 ·
912b6df
1
Parent(s): 4e219d9
up
Browse files- upload_folder.py +20 -0
upload_folder.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
from huggingface_hub import HfApi
|
| 3 |
+
import sys
|
| 4 |
+
|
| 5 |
+
api = HfApi()
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
folder = sys.argv[1]
|
| 9 |
+
repo = sys.argv[2]
|
| 10 |
+
|
| 11 |
+
# Upload all the content from the local folder to your remote Space.
|
| 12 |
+
# By default, files are uploaded at the root of the repo
|
| 13 |
+
api.upload_folder(
|
| 14 |
+
folder_path=folder,
|
| 15 |
+
repo_id=repo,
|
| 16 |
+
path_in_repo="./",
|
| 17 |
+
delete_patterns="*.git*", # Delete all remote text files before
|
| 18 |
+
create_pr=True,
|
| 19 |
+
commit_message="Add diffusers weights"
|
| 20 |
+
)
|