Spaces:
Paused
Paused
Commit ·
8e6bca2
1
Parent(s): a907317
app.py: enlarge target size for small reference image.
Browse files255 unmodified lines25625725825925926026126217 unmodified lines2802812822832842852862872882892902912925 unmodified lines298299300295301302303304194 unmodified lines49950050149650250350449950550650750831 unmodified lines540541542537543544545546255 unmodified lines seed, scheduler, #enable_LCM, enhance_face_region, #enhance_face_region, progress=gr.Progress(track_tqdm=True),): if face_image_path is None:17 unmodified lines
ref_image_path = pose_image_path if pose_image_path else face_image_path ref_image = PIL.Image.open(ref_image_path)
width, height = ref_image.size large_edge = max(width, height) if large_edge < 1024: scaling = 1024 / large_edge width = int(width * scaling) height = int(height * scaling)
CONTROLNET_DICT['pose']['strength'] = pose_strength CONTROLNET_DICT['canny']['strength'] = canny_strength5 unmodified lines }, 'model_name': f'{model_name}.safetensors', 'face_image_assets_ids': client.upload_assets([face_image_path]), 'ref_image_assets_ids': client.upload_assets([pose_image_path]) if pose_image_path else [], 'ref_image_assets_ids': client.upload_assets([ref_image_path]), 'prompt': prompt, 'negative_prompt': negative_prompt, 'controlnet': {194 unmodified lines scheduler = gr.Dropdown( label='Schedulers', choices=schedulers, value='Euler a', value='Euler', ) randomize_seed = gr.Checkbox(label='Randomize seed', value=True) enhance_face_region = gr.Checkbox(label='Enhance non-face region', value=True) #enhance_face_region = gr.Checkbox(label='Enhance non-face region', value=True)
with gr.Column(scale=1): gallery = gr.Image(label='Generated Images')31 unmodified lines seed, scheduler, #enable_LCM, enhance_face_region, #enhance_face_region, ], outputs=[gallery, usage_tips], )app.py+11-5