yamildiego commited on
Commit
0171dff
·
1 Parent(s): 71d0dea

fix apply style

Browse files
1_payload.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "face_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/bb51e995066c3cddc34a852f3e0c9077ada125ac/yann-lecun_resize.jpg",
3
+ "pose_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/71e330ef57fdbb85c07361f1bdbc3aba366c5cea/pose4.jpg",
4
+ "inputs": "a man",
5
+ "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy",
6
+ "guidance_scale": 5.0,
7
+ "num_inference_steps": 20,
8
+ "style_name": "Spring Festival"
9
+ }
payload.json → 2_payload.json RENAMED
@@ -4,5 +4,6 @@
4
  "inputs": "a man flying in the sky in Mars",
5
  "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy",
6
  "guidance_scale": 5.0,
7
- "num_inference_steps": 20
 
8
  }
 
4
  "inputs": "a man flying in the sky in Mars",
5
  "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy",
6
  "guidance_scale": 5.0,
7
+ "num_inference_steps": 20,
8
+ "style_name": "Mars"
9
  }
3_payload.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "face_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/c70974d8881709b5dc254d7f61f70c4a2c1cf27a/sam_resize.png",
3
+ "pose_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/71e330ef57fdbb85c07361f1bdbc3aba366c5cea/pose4.jpg",
4
+ "inputs": "a man doing a silly pose wearing a suite",
5
+ "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy",
6
+ "guidance_scale": 5.0,
7
+ "num_inference_steps": 20,
8
+ "style_name": "Jungle"
9
+ }
4_payload.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "face_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/e18b203476e06ac91c8d8e679fa91696e18b1bca/schmidhuber_resize.png",
3
+ "pose_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/1dfc830916f1b092e02d6b162ec1670432410b3e/pose3.jpg",
4
+ "inputs": "a man sit on a chair",
5
+ "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy",
6
+ "guidance_scale": 5.0,
7
+ "num_inference_steps": 20,
8
+ "style_name": "Neon"
9
+ }
5_payload.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "face_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/b16f3e1c22d076c56937d1fbaa75a3617ed8af9f/kaifu_resize.png",
3
+ "pose_image_path": "https://instantx-instantid.hf.space/--replicas/pz2rl/file=/tmp/gradio/6223f13a96184f75a0c2132adfeb5b79eee860a8/pose.jpg",
4
+ "inputs": "a man",
5
+ "negative_prompt": "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, anime, photorealistic, 35mm film, deformed, glitch, low contrast, noisy",
6
+ "guidance_scale": 5.0,
7
+ "num_inference_steps": 20,
8
+ "style_name": "Vibrant Color"
9
+ }
handler.py CHANGED
@@ -184,7 +184,7 @@ class EndpointHandler():
184
  negative_prompt = data.pop("negative_prompt", default_negative_prompt)
185
  style_name = data.pop("style_name", DEFAULT_STYLE_NAME)
186
 
187
- prompt = apply_style(style_name, prompt_input, negative_prompt)
188
 
189
  adapter_strength_ratio = 0.8
190
 
 
184
  negative_prompt = data.pop("negative_prompt", default_negative_prompt)
185
  style_name = data.pop("style_name", DEFAULT_STYLE_NAME)
186
 
187
+ prompt = apply_style(style_name, prompt_input)
188
 
189
  adapter_strength_ratio = 0.8
190