Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,6 @@ def transform_image(face_image):
|
|
50 |
# Resize the face image
|
51 |
processed_face_image = processed_face_image.resize(desired_size, Image.LANCZOS)
|
52 |
|
53 |
-
|
54 |
# Load the style image from the local path, resize it and convert to tensor
|
55 |
style_image_path = "examples/soyjak2.jpg" # Ensure this path is correct
|
56 |
style_image = Image.open(style_image_path).resize(desired_size, Image.LANCZOS)
|
@@ -59,7 +58,7 @@ def transform_image(face_image):
|
|
59 |
# Perform the transformation using the configured pipeline
|
60 |
image = pipeline(
|
61 |
prompt="soyjak",
|
62 |
-
ip_adapter_image=[style_image_tensor,
|
63 |
negative_prompt="monochrome, lowres, bad anatomy, worst quality, low quality",
|
64 |
num_inference_steps=30,
|
65 |
generator=generator,
|
|
|
50 |
# Resize the face image
|
51 |
processed_face_image = processed_face_image.resize(desired_size, Image.LANCZOS)
|
52 |
|
|
|
53 |
# Load the style image from the local path, resize it and convert to tensor
|
54 |
style_image_path = "examples/soyjak2.jpg" # Ensure this path is correct
|
55 |
style_image = Image.open(style_image_path).resize(desired_size, Image.LANCZOS)
|
|
|
58 |
# Perform the transformation using the configured pipeline
|
59 |
image = pipeline(
|
60 |
prompt="soyjak",
|
61 |
+
ip_adapter_image=[style_image_tensor, processed_face_image], # Ensure these are tensors
|
62 |
negative_prompt="monochrome, lowres, bad anatomy, worst quality, low quality",
|
63 |
num_inference_steps=30,
|
64 |
generator=generator,
|