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 ·
19b671d
1
Parent(s): c34e8fd
update dependencies
Browse files- handler.py +2 -2
- requirements.txt +2 -4
handler.py
CHANGED
|
@@ -47,8 +47,8 @@ class EndpointHandler():
|
|
| 47 |
|
| 48 |
transform = Compose([
|
| 49 |
Resize(
|
| 50 |
-
width=
|
| 51 |
-
height=
|
| 52 |
resize_target=False,
|
| 53 |
keep_aspect_ratio=True,
|
| 54 |
ensure_multiple_of=14,
|
|
|
|
| 47 |
|
| 48 |
transform = Compose([
|
| 49 |
Resize(
|
| 50 |
+
width=518,
|
| 51 |
+
height=518,
|
| 52 |
resize_target=False,
|
| 53 |
keep_aspect_ratio=True,
|
| 54 |
ensure_multiple_of=14,
|
requirements.txt
CHANGED
|
@@ -5,15 +5,13 @@ transformers==4.37.1
|
|
| 5 |
accelerate
|
| 6 |
safetensors
|
| 7 |
einops
|
| 8 |
-
onnxruntime
|
| 9 |
onnxruntime-gpu
|
| 10 |
spaces==0.19.4
|
| 11 |
omegaconf
|
|
|
|
| 12 |
huggingface-hub==0.20.2
|
| 13 |
opencv-python
|
| 14 |
insightface
|
| 15 |
gradio
|
| 16 |
controlnet_aux
|
| 17 |
-
gdown
|
| 18 |
-
peft
|
| 19 |
-
mediapipe
|
|
|
|
| 5 |
accelerate
|
| 6 |
safetensors
|
| 7 |
einops
|
|
|
|
| 8 |
onnxruntime-gpu
|
| 9 |
spaces==0.19.4
|
| 10 |
omegaconf
|
| 11 |
+
peft
|
| 12 |
huggingface-hub==0.20.2
|
| 13 |
opencv-python
|
| 14 |
insightface
|
| 15 |
gradio
|
| 16 |
controlnet_aux
|
| 17 |
+
gdown
|
|
|
|
|
|