multimodalart HF staff commited on
Commit
0609de7
1 Parent(s): d77cf67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -9
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(fn=generate_image,
59
- inputs=[gr.Files(label="Drag 1 or more photos of your face", file_types=["image"]),gr.Textbox(label="Prompt"), gr.Textbox(label="Negative Prompt")],
60
- outputs=[gr.Gallery(label="Generated Image")],
61
- title="IP-Adapter-FaceID demo",
62
- description="Demo for the [h94/IP-Adapter-FaceID model](https://huggingface.co/h94/IP-Adapter-FaceID)",
63
- allow_flagging=False,
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()