Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -75,13 +75,14 @@ def generate_sticker(input_image: Image.Image, prompt: str):
|
|
| 75 |
init_image = input_image.convert("RGB").resize((512, 512))
|
| 76 |
|
| 77 |
# IP-Adapter expects the reference image via image_embeds, which is produced by this function:
|
| 78 |
-
image_embeds = pipe.prepare_ip_adapter_image_embeds(face_img)
|
| 79 |
|
| 80 |
# Run inference (low strength for identity preservation)
|
| 81 |
result = pipe(
|
| 82 |
prompt=prompt,
|
| 83 |
image=init_image,
|
| 84 |
-
image_embeds=image_embeds,
|
|
|
|
| 85 |
strength=0.65,
|
| 86 |
guidance_scale=7.5,
|
| 87 |
num_inference_steps=30
|
|
|
|
| 75 |
init_image = input_image.convert("RGB").resize((512, 512))
|
| 76 |
|
| 77 |
# IP-Adapter expects the reference image via image_embeds, which is produced by this function:
|
| 78 |
+
# image_embeds = pipe.prepare_ip_adapter_image_embeds(face_img)
|
| 79 |
|
| 80 |
# Run inference (low strength for identity preservation)
|
| 81 |
result = pipe(
|
| 82 |
prompt=prompt,
|
| 83 |
image=init_image,
|
| 84 |
+
# image_embeds=image_embeds,
|
| 85 |
+
ip_adapter_image=face_image,
|
| 86 |
strength=0.65,
|
| 87 |
guidance_scale=7.5,
|
| 88 |
num_inference_steps=30
|