Nick088 commited on
Commit
f68a1d2
β€’
1 Parent(s): 76b17a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -24,7 +24,7 @@ os.chdir("Stable_Diffusion_Finetuned_Minecraft_Skin_Generator")
24
 
25
 
26
  @spaces.GPU()
27
- def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_scale, model_precision_type, seed, num_images_per_prompt, filename, model_3d, verbose):
28
 
29
  # inference
30
  if stable_diffusion_model == '2':
@@ -50,7 +50,6 @@ num_inference_steps = gr.Slider(label="Number of Inference Steps", info="The num
50
  guidance_scale = gr.Slider(label="Guidance Scale", info="Controls how much the image generation process follows the text prompt. Higher values make the image stick more closely to the input text.", minimum=0.0, maximum=10.0, value=7.5, step=0.1)
51
  model_precision_type = 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 is more precise but more resource consuming")
52
  seed = gr.Slider(value=42, minimum=0, maximum=MAX_SEED, step=1, label="Seed", info="A starting point to initiate the generation process, put 0 for a random one")
53
- num_images_per_prompt = gr.Slider(label="Number of Images to generate with the settings",minimum=1, maximum=4, step=1, value=1)
54
  filename = gr.Textbox(label="Output Image Name", info="The name of the file of the output image skin, keep the.png", value="output-skin.png")
55
  model_3d = gr.Checkbox(label="See as 3D Model too", info="View the generated skin as a 3D Model too", value=True)
56
  verbose = gr.Checkbox(label="Verbose Output", info="Produce more detailed output while running", value=False)
@@ -66,13 +65,12 @@ gr.Interface(
66
  guidance_scale,
67
  model_precision_type,
68
  seed,
69
- num_images_per_prompt,
70
  filename,
71
  model_3d,
72
  verbose
73
  ],
74
  outputs=[
75
- gr.Gallery(label="Generated Minecraft Skin Image Assets", elem_id="gallery", elem_classes="pixelated checkered"),
76
  gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model View of the Skin")
77
  ],
78
  title="Minecraft Skin Generator",
 
24
 
25
 
26
  @spaces.GPU()
27
+ def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_scale, model_precision_type, seed, filename, model_3d, verbose):
28
 
29
  # inference
30
  if stable_diffusion_model == '2':
 
50
  guidance_scale = gr.Slider(label="Guidance Scale", info="Controls how much the image generation process follows the text prompt. Higher values make the image stick more closely to the input text.", minimum=0.0, maximum=10.0, value=7.5, step=0.1)
51
  model_precision_type = 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 is more precise but more resource consuming")
52
  seed = gr.Slider(value=42, minimum=0, maximum=MAX_SEED, step=1, label="Seed", info="A starting point to initiate the generation process, put 0 for a random one")
 
53
  filename = gr.Textbox(label="Output Image Name", info="The name of the file of the output image skin, keep the.png", value="output-skin.png")
54
  model_3d = gr.Checkbox(label="See as 3D Model too", info="View the generated skin as a 3D Model too", value=True)
55
  verbose = gr.Checkbox(label="Verbose Output", info="Produce more detailed output while running", value=False)
 
65
  guidance_scale,
66
  model_precision_type,
67
  seed,
 
68
  filename,
69
  model_3d,
70
  verbose
71
  ],
72
  outputs=[
73
+ gr.Image(label="Generated Minecraft Skin Image Asset", elem_classes="pixelated checkered"),
74
  gr.Model3D(clear_color=[0.0, 0.0, 0.0, 0.0], label="3D Model View of the Skin")
75
  ],
76
  title="Minecraft Skin Generator",