Spaces:
Runtime error
Runtime error
Commit
β’
0609de7
1
Parent(s):
d77cf67
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,6 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
28 |
torch_dtype=torch.float16,
|
29 |
scheduler=noise_scheduler,
|
30 |
vae=vae,
|
31 |
-
#feature_extractor=None,
|
32 |
-
#safety_checker=None
|
33 |
)
|
34 |
|
35 |
ip_model = IPAdapterFaceID(pipe, ip_ckpt, device)
|
@@ -55,11 +53,21 @@ def generate_image(images, prompt, negative_prompt):
|
|
55 |
print(image)
|
56 |
return image
|
57 |
|
58 |
-
demo = gr.Interface(
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
demo.launch()
|
|
|
28 |
torch_dtype=torch.float16,
|
29 |
scheduler=noise_scheduler,
|
30 |
vae=vae,
|
|
|
|
|
31 |
)
|
32 |
|
33 |
ip_model = IPAdapterFaceID(pipe, ip_ckpt, device)
|
|
|
53 |
print(image)
|
54 |
return image
|
55 |
|
56 |
+
demo = gr.Interface(
|
57 |
+
fn=generate_image,
|
58 |
+
inputs=[
|
59 |
+
gr.Files(
|
60 |
+
label="Drag 1 or more photos of your face",
|
61 |
+
file_types=["image"]
|
62 |
+
),
|
63 |
+
gr.Textbox(label="Prompt",
|
64 |
+
info="Try something like 'a photo of a man/woman/person'",
|
65 |
+
placeholder="A photo of a [man/woman/person]..."),
|
66 |
+
gr.Textbox(label="Negative Prompt")
|
67 |
+
],
|
68 |
+
outputs=[gr.Gallery(label="Generated Image")],
|
69 |
+
title="IP-Adapter-FaceID demo",
|
70 |
+
description="Demo for the [h94/IP-Adapter-FaceID model](https://huggingface.co/h94/IP-Adapter-FaceID)",
|
71 |
+
allow_flagging=False,
|
72 |
+
)
|
73 |
demo.launch()
|