File size: 1,177 Bytes
2c6a2ce
 
 
 
 
4632b4d
 
 
2c6a2ce
 
 
 
4632b4d
2c6a2ce
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import gradio as gr

from convert import convert

DESCRIPTION = """
- ⚠️ Oops! I broke the space and reverting the changes didn't fix it. 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)

"""

demo = gr.Interface(
    title="No longer working",
    description=DESCRIPTION,
    allow_flagging="never",
    article="Check out the [Diffusers repo on GitHub](https://github.com/huggingface/diffusers)",
    inputs=[
        gr.Text(max_lines=1, label="your_hf_token"),
        gr.Text(max_lines=1, label="model_id"),
        gr.Text(max_lines=1, label="filename"),
        gr.Radio(label="Model type", choices=["v1", "v2", "ControlNet"]),
        gr.Radio(label="Sample size (px)", choices=[512, 768]),
        gr.Radio(label="Scheduler type", choices=["pndm", "heun", "euler", "dpm", "ddim"], value="dpm"),
        gr.Radio(label="Extract EMA or non-EMA?", choices=["ema", "non-ema"], value="ema"),
    ],
    outputs=[gr.Markdown(label="output")],
    fn=convert,
).queue(max_size=10, concurrency_count=1)

demo.launch(show_api=True)