Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -26,25 +26,6 @@ def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_
|
|
26 |
|
27 |
return output_image_name
|
28 |
|
29 |
-
|
30 |
-
prompt = gr.Textbox(label="Prompt", interactive=True)
|
31 |
-
|
32 |
-
stable_diffusion_model = gr.Dropdown(["2", "xl"], interactive=True, label="Stable Diffusion Model", value="xl", info="Choose which Stable Diffusion Model to use, xl understands prompts better")
|
33 |
-
|
34 |
-
num_inference_steps = gr.Number(value=50, minimum=1, interactive=True, label="Inference Steps",)
|
35 |
-
|
36 |
-
guidance_scale = gr.Number(value=7.5, minimum=0.1, interactive=True, label="Guidance Scale", info="How closely the generated image adheres to the prompt")
|
37 |
-
|
38 |
-
num_images_per_prompt = gr.Number(value=1, minimum=1, interactive=True, label="Images Per Prompt", info="The number of images to make with the prompt")
|
39 |
-
|
40 |
-
model_precision_type = gr.Dropdown(["fp16", "fp32"], value="fp16", interactive=True, label="Model Precision Type", info="The precision type to load the model, like fp16 which is faster, or fp32 which gives better results")
|
41 |
-
|
42 |
-
seed = gr.Number(value=42, interactive=True, label="Seed", info="A starting point to initiate the generation process, put 0 for a random one")
|
43 |
-
|
44 |
-
output_image_name = gr.Textbox(label="Name of Generated Skin Output", interactive=True, value="output.png")
|
45 |
-
|
46 |
-
verbose = gr.Checkbox(label="Verbose Output", interactive=True, value=False, info="Produce verbose output while running")
|
47 |
-
|
48 |
|
49 |
# Define Gradio UI components
|
50 |
prompt_input = gr.Textbox(label="Your Prompt", info="What the Minecraft Skin should look like")
|
@@ -53,6 +34,7 @@ num_inference_steps_input = gr.Number(label="Number of Inference Steps", precisi
|
|
53 |
guidance_scale_input = gr.Number(minimum=0.1, value=7.5, label="Guidance Scale", info="The number of denoising steps of the image. More denoising steps usually lead to a higher quality image at the cost of slower inference")
|
54 |
num_images_per_prompt_input = gr.Number(minimum=1, value=1, precision=0, label="Number of Images per Prompt", info="The number of images to make with the prompt")
|
55 |
model_precision_type_input = gr.Dropdown(["fp16", "fp32"], value="fp16", label="Model Precision Type", info="The precision type to load the model, like fp16 which is faster, or fp32 which gives better results")
|
|
|
56 |
output_image_name_input = gr.Textbox(label="Output Image Name", info="The name of the file of the output image skin, keep the .png", value="output-skin.png")
|
57 |
verbose_input = gr.Checkbox(label="Verbose Output", info="Produce more detailed output while running", value=False)
|
58 |
|
|
|
26 |
|
27 |
return output_image_name
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
# Define Gradio UI components
|
31 |
prompt_input = gr.Textbox(label="Your Prompt", info="What the Minecraft Skin should look like")
|
|
|
34 |
guidance_scale_input = gr.Number(minimum=0.1, value=7.5, label="Guidance Scale", info="The number of denoising steps of the image. More denoising steps usually lead to a higher quality image at the cost of slower inference")
|
35 |
num_images_per_prompt_input = gr.Number(minimum=1, value=1, precision=0, label="Number of Images per Prompt", info="The number of images to make with the prompt")
|
36 |
model_precision_type_input = gr.Dropdown(["fp16", "fp32"], value="fp16", label="Model Precision Type", info="The precision type to load the model, like fp16 which is faster, or fp32 which gives better results")
|
37 |
+
seed_input = gr.Number(value=42, label="Seed", info="A starting point to initiate generation, put 0 for a random one")
|
38 |
output_image_name_input = gr.Textbox(label="Output Image Name", info="The name of the file of the output image skin, keep the .png", value="output-skin.png")
|
39 |
verbose_input = gr.Checkbox(label="Verbose Output", info="Produce more detailed output while running", value=False)
|
40 |
|