import gradio as gr import os from convert_repo_to_safetensors_sd_gr import convert_repo_to_safetensors_multi_sd os.environ['HF_OUTPUT_REPO'] = 'Yntec/lnkdn' css = """""" with gr.Blocks(theme="NoCrypt/miku@>=1.2.2", css=css) as demo: gr.HTML( """

- For original behavior please use the alternatives below: - https://huggingface.co/spaces/diffusers/sd-to-diffusers (the original) - https://huggingface.co/spaces/Yntec/sd-to-diffusers-backup (my back up)

""" ) with gr.Column(): repo_id = gr.Textbox(label="Repo ID", placeholder="author/model", value="", lines=1) is_half = gr.Checkbox(label="Half precision", value=True) is_upload = gr.Checkbox(label="Upload safetensors to HF Repo", info="Fast download, but files will be public.", value=False) uploaded_urls = gr.CheckboxGroup(visible=False, choices=[], value=None) run_button = gr.Button(value="Convert") st_file = gr.Files(label="Output", interactive=False) st_md = gr.Markdown() gr.on( triggers=[repo_id.submit, run_button.click], fn=convert_repo_to_safetensors_multi_sd, inputs=[repo_id, st_file, is_upload, uploaded_urls, is_half], outputs=[st_file, uploaded_urls, st_md], ) demo.queue() demo.launch()