Spaces:
Runtime error
Runtime error
Commit
β’
a550ff1
1
Parent(s):
ad7df92
Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,10 @@ def generate_image(image, prompt, negative_prompt):
|
|
42 |
faces = app.get(image)
|
43 |
faceid_embeds = torch.from_numpy(faces[0].normed_embedding).unsqueeze(0)
|
44 |
|
45 |
-
|
46 |
prompt=prompt, negative_prompt=negative_prompt, faceid_embeds=faceid_embeds, width=512, height=512, num_inference_steps=30
|
47 |
-
)
|
48 |
-
return
|
49 |
|
50 |
demo = gr.Interface(fn=generate_image, inputs=[gr.Image(label="Your face"), gr.Textbox(label="Prompt"), gr.Textbox(label="Negative Prompt")], outputs=[gr.Image(label="Generated Image")])
|
51 |
demo.launch()
|
|
|
42 |
faces = app.get(image)
|
43 |
faceid_embeds = torch.from_numpy(faces[0].normed_embedding).unsqueeze(0)
|
44 |
|
45 |
+
image = ip_model.generate(
|
46 |
prompt=prompt, negative_prompt=negative_prompt, faceid_embeds=faceid_embeds, width=512, height=512, num_inference_steps=30
|
47 |
+
).images[0]
|
48 |
+
return image
|
49 |
|
50 |
demo = gr.Interface(fn=generate_image, inputs=[gr.Image(label="Your face"), gr.Textbox(label="Prompt"), gr.Textbox(label="Negative Prompt")], outputs=[gr.Image(label="Generated Image")])
|
51 |
demo.launch()
|