diffusers/sdxl-to-diffusers
28
1import gradio as gr2 3from convert import convert4 5DESCRIPTION = """6The steps are the following:7 8- Paste a read-access token from hf.co/settings/tokens. Read access is enough given that we will open a PR against the source repo.9- Input a model id from the Hub10- Input the filename from the root dir of the repo that you would like to convert, e.g. 'xl-pruned.safetensors'11- Click "Submit"12- That's it! You'll get feedback if it works or not, and if it worked, you'll get the URL of the opened PR 🔥13 14⚠️ If you encounter weird error messages, please have a look into the Logs and feel free to open a PR to correct the error messages.15"""16 17demo = gr.Interface(18 title="Convert any Stable Diffusion XL checkpoint to Diffusers and open a PR",19 description=DESCRIPTION,20 allow_flagging="never",21 article="Check out the [Diffusers repo on GitHub](https://github.com/huggingface/diffusers)",22 inputs=[23 gr.Text(max_lines=1, label="your_hf_token"),24 gr.Text(max_lines=1, label="model_id"),25 gr.Text(max_lines=1, label="filename"),26 ],27 outputs=[gr.Markdown(label="output")],28 fn=convert,29).queue(max_size=10, concurrency_count=1)30 31demo.launch(show_api=True)32 