SunderAli17 commited on
Commit
471490d
·
verified ·
1 Parent(s): 1bc2ff6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -21,8 +21,8 @@ DEFAULT_NEGATIVE_PROMPT = (
21
  @spaces.GPU
22
  def run(*args):
23
  id_image = args[0]
24
- supp_images = args[1:4]
25
- prompt, neg_prompt, scale, n_samples, seed, steps, H, W, id_scale, mode, id_mix = args[4:]
26
 
27
  pipeline.debug_img_list = []
28
  if mode == 'fidelity':
@@ -59,7 +59,7 @@ def run(*args):
59
 
60
 
61
  _MARKDOWN_ = """
62
- This is the demo for ToonMagev2 for Image to Image Stylization
63
 
64
  **Tips**
65
 
@@ -72,6 +72,8 @@ This is the demo for ToonMagev2 for Image to Image Stylization
72
  If you find that the generated results are not stylized enough, you can choose the extremely style mode.
73
 
74
  Try out with different prompts using your image and do provide your feedback.
 
 
75
 
76
  **Demo by [Sunder Ali Khowaja](https://sander-ali.github.io) - [X](https://x.com/SunderAKhowaja) -[Github](https://github.com/sander-ali) -[Hugging Face](https://huggingface.co/SunderAli17)**
77
  """
@@ -99,12 +101,12 @@ with gr.Blocks(title="ToonMagev2", js = js_func, theme = theme) as SAK:
99
  supp_image1 = gr.Image(
100
  label="Additional ID image (auxiliary)", sources="upload", type="numpy", height=256
101
  )
102
- supp_image2 = gr.Image(
103
- label="Additional ID image (auxiliary)", sources="upload", type="numpy", height=256
104
- )
105
- supp_image3 = gr.Image(
106
- label="Additional ID image (auxiliary)", sources="upload", type="numpy", height=256
107
- )
108
  prompt = gr.Textbox(label="Prompt", value='portrait,cinematic,wolf ears,white hair')
109
  submit = gr.Button("Generate")
110
  neg_prompt = gr.Textbox(label="Negative Prompt", value=DEFAULT_NEGATIVE_PROMPT)
@@ -196,8 +198,8 @@ with gr.Blocks(title="ToonMagev2", js = js_func, theme = theme) as SAK:
196
  inps = [
197
  face_image,
198
  supp_image1,
199
- supp_image2,
200
- supp_image3,
201
  prompt,
202
  neg_prompt,
203
  scale,
 
21
  @spaces.GPU
22
  def run(*args):
23
  id_image = args[0]
24
+ supp_images = args[1]
25
+ prompt, neg_prompt, scale, n_samples, seed, steps, H, W, id_scale, mode, id_mix = args[2:]
26
 
27
  pipeline.debug_img_list = []
28
  if mode == 'fidelity':
 
59
 
60
 
61
  _MARKDOWN_ = """
62
+ <h2><b>This is the demo for ToonMagev2 for Image to Image Stylization</b></h2>
63
 
64
  **Tips**
65
 
 
72
  If you find that the generated results are not stylized enough, you can choose the extremely style mode.
73
 
74
  Try out with different prompts using your image and do provide your feedback.
75
+
76
+ Note: The image of the women is generated using AI, therefore it does not resemble any living person.
77
 
78
  **Demo by [Sunder Ali Khowaja](https://sander-ali.github.io) - [X](https://x.com/SunderAKhowaja) -[Github](https://github.com/sander-ali) -[Hugging Face](https://huggingface.co/SunderAli17)**
79
  """
 
101
  supp_image1 = gr.Image(
102
  label="Additional ID image (auxiliary)", sources="upload", type="numpy", height=256
103
  )
104
+ # supp_image2 = gr.Image(
105
+ # label="Additional ID image (auxiliary)", sources="upload", type="numpy", height=256
106
+ # )
107
+ # supp_image3 = gr.Image(
108
+ # label="Additional ID image (auxiliary)", sources="upload", type="numpy", height=256
109
+ # )
110
  prompt = gr.Textbox(label="Prompt", value='portrait,cinematic,wolf ears,white hair')
111
  submit = gr.Button("Generate")
112
  neg_prompt = gr.Textbox(label="Negative Prompt", value=DEFAULT_NEGATIVE_PROMPT)
 
198
  inps = [
199
  face_image,
200
  supp_image1,
201
+ # supp_image2,
202
+ # supp_image3,
203
  prompt,
204
  neg_prompt,
205
  scale,