Instructions to use Charles-Elena/InstantID with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Charles-Elena/InstantID with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Charles-Elena/InstantID", 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 ·
bdbd68b
1
Parent(s): a779a1d
add locally
Browse files
insightface/python-package/insightface/utils/storage.py
CHANGED
|
@@ -12,13 +12,14 @@ def download(sub_dir, name, force=False, root='~/.insightface'):
|
|
| 12 |
if osp.exists(dir_path) and not force:
|
| 13 |
return dir_path
|
| 14 |
print('download_path:', dir_path)
|
| 15 |
-
zip_file_path =
|
| 16 |
-
|
| 17 |
-
#
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 22 |
if not os.path.exists(dir_path):
|
| 23 |
os.makedirs(dir_path)
|
| 24 |
with zipfile.ZipFile(zip_file_path) as zf:
|
|
|
|
| 12 |
if osp.exists(dir_path) and not force:
|
| 13 |
return dir_path
|
| 14 |
print('download_path:', dir_path)
|
| 15 |
+
zip_file_path = "./models/antelopev2.zip"
|
| 16 |
+
# zip_file_path = os.path.join(_root, sub_dir, name + '.zip')
|
| 17 |
+
# print('zip_file_path:', zip_file_path)
|
| 18 |
+
# # model_url = "%s/%s.zip"%(BASE_REPO_URL, name)
|
| 19 |
+
# model_url_an = "https://huggingface.co/Charles-Elena/antelopev2"
|
| 20 |
+
# download_file(model_url_an,
|
| 21 |
+
# path=zip_file_path,
|
| 22 |
+
# overwrite=True)
|
| 23 |
if not os.path.exists(dir_path):
|
| 24 |
os.makedirs(dir_path)
|
| 25 |
with zipfile.ZipFile(zip_file_path) as zf:
|
requirements.txt
CHANGED
|
@@ -11,7 +11,6 @@ spaces==0.19.4
|
|
| 11 |
omegaconf
|
| 12 |
huggingface-hub==0.20.2
|
| 13 |
opencv-python
|
| 14 |
-
insightface
|
| 15 |
gradio
|
| 16 |
controlnet_aux
|
| 17 |
gdown
|
|
|
|
| 11 |
omegaconf
|
| 12 |
huggingface-hub==0.20.2
|
| 13 |
opencv-python
|
|
|
|
| 14 |
gradio
|
| 15 |
controlnet_aux
|
| 16 |
gdown
|