AP123 commited on
Commit
7ebe221
1 Parent(s): 18806cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -21,7 +21,7 @@ pipeline = AutoPipelineForText2Image.from_pretrained(
21
  pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)
22
 
23
  pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name=["ip-adapter-plus_sdxl_vit-h.safetensors", "ip-adapter-plus-face_sdxl_vit-h.safetensors"])
24
- pipeline.set_ip_adapter_scale([0.7, 0.5])
25
 
26
  pipeline.enable_model_cpu_offload()
27
 
@@ -56,10 +56,14 @@ def transform_image(face_image):
56
  # Gradio interface setup
57
  demo = gr.Interface(
58
  fn=transform_image,
59
- inputs=gr.Image(label="Upload your face image"),
 
 
 
 
60
  outputs=gr.Image(label="Your Soyjak"),
61
  title="InstaSoyjak - turn anyone into a Soyjak",
62
- description="All you need to do is upload an image. Please use responsibly. Please follow me on Twitter if you like this space: https://twitter.com/angrypenguinPNG. Idea from Yacine, please give him a follow: https://twitter.com/yacineMTB.",
63
  )
64
 
65
  demo.queue(max_size=20) # Configures the queue with a maximum size of 20
 
21
  pipeline.scheduler = DDIMScheduler.from_config(pipeline.scheduler.config)
22
 
23
  pipeline.load_ip_adapter("h94/IP-Adapter", subfolder="sdxl_models", weight_name=["ip-adapter-plus_sdxl_vit-h.safetensors", "ip-adapter-plus-face_sdxl_vit-h.safetensors"])
24
+ pipeline.set_ip_adapter_scale([soy_strength, anon_strength])
25
 
26
  pipeline.enable_model_cpu_offload()
27
 
 
56
  # Gradio interface setup
57
  demo = gr.Interface(
58
  fn=transform_image,
59
+ inputs=[
60
+ gr.Image(label="Upload your face image"),
61
+ gr.Slider(minimum=0, maximum=1, step=0.05, value=0.7, label="Soy Strength"),
62
+ gr.Slider(minimum=0, maximum=1, step=0.05, value=0.5, label="Face Strength")
63
+ ],
64
  outputs=gr.Image(label="Your Soyjak"),
65
  title="InstaSoyjak - turn anyone into a Soyjak",
66
+ description="All you need to do is upload an image. **Please use responsibly.** Please follow me on Twitter if you like this space: https://twitter.com/angrypenguinPNG. Idea from Yacine, please give him a follow: https://twitter.com/yacineMTB.",
67
  )
68
 
69
  demo.queue(max_size=20) # Configures the queue with a maximum size of 20