Spaces:
Paused
Paused
Commit ·
8e6bca2
1
Parent(s): a907317
app.py: enlarge target size for small reference image.
Browse files255 unmodified lines25625725825926026126217 unmodified lines2802812822832842852865 unmodified lines292293294295296297298194 unmodified lines49349449549649749849950050150231 unmodified lines534535536537538539540255 unmodified linesseed,scheduler,#enable_LCM,enhance_face_region,progress=gr.Progress(track_tqdm=True),):if face_image_path is None:17 unmodified linesref_image_path = pose_image_path if pose_image_path else face_image_pathref_image = PIL.Image.open(ref_image_path)width, height = ref_image.sizeCONTROLNET_DICT['pose']['strength'] = pose_strengthCONTROLNET_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 [],'prompt': prompt,'negative_prompt': negative_prompt,'controlnet': {194 unmodified linesscheduler = gr.Dropdown(label='Schedulers',choices=schedulers,value='Euler a',)randomize_seed = gr.Checkbox(label='Randomize seed', 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 linesseed,scheduler,#enable_LCM,enhance_face_region,],outputs=[gallery, usage_tips],)255 unmodified lines25625725825926026126217 unmodified lines2802812822832842852862872882892902912925 unmodified lines298299300301302303304194 unmodified lines49950050150250350450550650750831 unmodified lines540541542543544545546255 unmodified linesseed,scheduler,#enable_LCM,#enhance_face_region,progress=gr.Progress(track_tqdm=True),):if face_image_path is None:17 unmodified linesref_image_path = pose_image_path if pose_image_path else face_image_pathref_image = PIL.Image.open(ref_image_path)width, height = ref_image.sizelarge_edge = max(width, height)if large_edge < 1024:scaling = 1024 / large_edgewidth = int(width * scaling)height = int(height * scaling)CONTROLNET_DICT['pose']['strength'] = pose_strengthCONTROLNET_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([ref_image_path]),'prompt': prompt,'negative_prompt': negative_prompt,'controlnet': {194 unmodified linesscheduler = gr.Dropdown(label='Schedulers',choices=schedulers,value='Euler',)randomize_seed = gr.Checkbox(label='Randomize seed', 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 linesseed,scheduler,#enable_LCM,#enhance_face_region,],outputs=[gallery, usage_tips],)
app.py+11-5