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 ·
e462e4d
1
Parent(s): f84540b
test
Browse files- handler.py +0 -2
handler.py
CHANGED
|
@@ -69,12 +69,10 @@ class EndpointHandler():
|
|
| 69 |
self.pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")
|
| 70 |
self.pipe.disable_lora()
|
| 71 |
|
| 72 |
-
|
| 73 |
self.pipe.cuda()
|
| 74 |
self.pipe.load_ip_adapter_instantid(face_adapter)
|
| 75 |
self.pipe.image_proj_model.to("cuda")
|
| 76 |
self.pipe.unet.to("cuda")
|
| 77 |
-
|
| 78 |
|
| 79 |
# if we need more parameters
|
| 80 |
# scheduler_class_name = "EulerDiscreteScheduler"
|
|
|
|
| 69 |
self.pipe.load_lora_weights("latent-consistency/lcm-lora-sdxl")
|
| 70 |
self.pipe.disable_lora()
|
| 71 |
|
|
|
|
| 72 |
self.pipe.cuda()
|
| 73 |
self.pipe.load_ip_adapter_instantid(face_adapter)
|
| 74 |
self.pipe.image_proj_model.to("cuda")
|
| 75 |
self.pipe.unet.to("cuda")
|
|
|
|
| 76 |
|
| 77 |
# if we need more parameters
|
| 78 |
# scheduler_class_name = "EulerDiscreteScheduler"
|