@@ -102,4 +102,4 @@ parser.add_argument("--no-gradio-queue", action='store_true', help="Disables gra
parser.add_argument("--skip-version-check",action='store_true',help="Do not check versions of torch and xformers")
parser.add_argument("--no-hashing",action='store_true',help="disable sha256 hashing of checkpoints to help loading performance",default=False)
parser.add_argument("--no-download-sd-model",action='store_true',help="don't download SD1.5 model even if no model is found in --ckpt-dir",default=False)
parser.add_argument('--subpath',type=str,help='customize the subpath for gradio, use with reverse proxy')
\ No newline at end of file
parser.add_argument('--subpath',type=str,help='customize the subpath for gradio, use with reverse proxy')
can_use_sdp=hasattr(torch.nn.functional,"scaled_dot_product_attention")andcallable(torch.nn.functional.scaled_dot_product_attention)# not everyone has torch 2.x to use sdp
...
...
@@ -92,12 +92,12 @@ def fix_checkpoint():
defweighted_loss(sd_model,pred,target,mean=True):
#Calculate the weight normally, but ignore the mean
process_focal_crop_entropy_weight=gr.Slider(label='Focal point entropy weight',value=0.15,minimum=0.0,maximum=1.0,step=0.05,elem_id="train_process_focal_crop_entropy_weight")
process_focal_crop_edges_weight=gr.Slider(label='Focal point edges weight',value=0.5,minimum=0.0,maximum=1.0,step=0.05,elem_id="train_process_focal_crop_edges_weight")
hide_tags=gr.CheckboxGroup(value=["ads","localization","installed"],label="Hide extensions with tags",choices=["script","ads","localization","installed"])
info=gr.HTML("<p style=\"margin-bottom:0.75em\">Will upscale the image by the selected scale factor; use width and height sliders to set tile size</p>")