aiqtech commited on
Commit
3da96b2
·
verified ·
1 Parent(s): ad93d00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -156,7 +156,6 @@ def generate_pose_transfer(
156
  guidance_scale=7.5, # Increased for better pose adherence
157
  num_inference_steps=28,
158
  lora_scale=1.0,
159
- controlnet_scale=1.0, # Added control strength
160
  enhance_pose=False,
161
  progress=gr.Progress(track_tqdm=True)
162
  ):
@@ -243,7 +242,7 @@ def generate_pose_transfer(
243
  # Generate image with stronger pose control
244
  with torch.cuda.amp.autocast(dtype=torch.bfloat16):
245
  if "Kontext" in MODEL_STATUS:
246
- # Use Kontext pipeline with enhanced settings
247
  result = pipe(
248
  image=concatenated_input,
249
  prompt=full_prompt,
@@ -253,7 +252,6 @@ def generate_pose_transfer(
253
  generator=generator,
254
  width=width,
255
  height=height,
256
- controlnet_conditioning_scale=controlnet_scale, # Control strength
257
  ).images[0]
258
  else:
259
  # Use standard FLUX pipeline
@@ -467,15 +465,6 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
467
  interactive=False
468
  )
469
 
470
- controlnet_scale = gr.Slider(
471
- label="Pose Control Strength",
472
- minimum=0.5,
473
- maximum=2.0,
474
- step=0.1,
475
- value=1.0,
476
- info="How strongly to enforce the pose"
477
- )
478
-
479
  enhance_pose = gr.Checkbox(
480
  label="Auto-enhance pose edges",
481
  value=False
@@ -562,7 +551,6 @@ with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
562
  guidance_scale,
563
  num_inference_steps,
564
  lora_scale,
565
- controlnet_scale,
566
  enhance_pose
567
  ],
568
  outputs=[result_image, seed_used, concat_preview]
 
156
  guidance_scale=7.5, # Increased for better pose adherence
157
  num_inference_steps=28,
158
  lora_scale=1.0,
 
159
  enhance_pose=False,
160
  progress=gr.Progress(track_tqdm=True)
161
  ):
 
242
  # Generate image with stronger pose control
243
  with torch.cuda.amp.autocast(dtype=torch.bfloat16):
244
  if "Kontext" in MODEL_STATUS:
245
+ # Use Kontext pipeline - removed unsupported controlnet_conditioning_scale
246
  result = pipe(
247
  image=concatenated_input,
248
  prompt=full_prompt,
 
252
  generator=generator,
253
  width=width,
254
  height=height,
 
255
  ).images[0]
256
  else:
257
  # Use standard FLUX pipeline
 
465
  interactive=False
466
  )
467
 
 
 
 
 
 
 
 
 
 
468
  enhance_pose = gr.Checkbox(
469
  label="Auto-enhance pose edges",
470
  value=False
 
551
  guidance_scale,
552
  num_inference_steps,
553
  lora_scale,
 
554
  enhance_pose
555
  ],
556
  outputs=[result_image, seed_used, concat_preview]