This also handles type casting so that ROCm and MPS torch devices work correctly without --no-half. One cast is required for deepbooru in deepbooru_model.py, some explicit casting is required for img2img and inpainting. depth_model can't be converted to float16 or it won't work correctly on some systems (it's known to have issues on MPS) so in sd_models.py model.depth_model is removed for model.half().
@ -157,4 +157,5 @@ Licenses for borrowed code can be found in `Settings -> Licenses` screen, and al
- DeepDanbooru - interrogator for anime diffusers https://github.com/KichangKim/DeepDanbooru
- DeepDanbooru - interrogator for anime diffusers https://github.com/KichangKim/DeepDanbooru
- Security advice - RyotaK
- Security advice - RyotaK
- Initial Gradio script - posted on 4chan by an Anonymous user. Thank you Anonymous user.
- Initial Gradio script - posted on 4chan by an Anonymous user. Thank you Anonymous user.
- Sampling in float32 precision from a float16 UNet - marunine for the idea, Birch-san for the example Diffusers implementation (https://github.com/Birch-san/diffusers-play/tree/92feee6)
parser.add_argument("--always-batch-cond-uncond",action='store_true',help="disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram")
parser.add_argument("--always-batch-cond-uncond",action='store_true',help="disables cond/uncond batching that is enabled to save memory with --medvram or --lowvram")
parser.add_argument("--unload-gfpgan",action='store_true',help="does not do anything.")
parser.add_argument("--unload-gfpgan",action='store_true',help="does not do anything.")
parser.add_argument("--precision",type=str,help="evaluate at this precision",choices=["full","autocast"],default="autocast")
parser.add_argument("--precision",type=str,help="evaluate at this precision",choices=["full","autocast"],default="autocast")
parser.add_argument("--upcast-sampling",action='store_true',help="upcast sampling. No effect with --no-half. Usually produces similar results to --no-half with better performance while using less memory.")
parser.add_argument("--share",action='store_true',help="use share=True for gradio and make the UI accessible through their site")
parser.add_argument("--share",action='store_true',help="use share=True for gradio and make the UI accessible through their site")
parser.add_argument("--ngrok",type=str,help="ngrok authtoken, alternative to gradio --share",default=None)
parser.add_argument("--ngrok",type=str,help="ngrok authtoken, alternative to gradio --share",default=None)
parser.add_argument("--ngrok-region",type=str,help="The region in which ngrok should start.",default="us")
parser.add_argument("--ngrok-region",type=str,help="The region in which ngrok should start.",default="us")