Nick088 commited on
Commit
9677f4f
β€’
1 Parent(s): 2e597c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -2,6 +2,7 @@ import subprocess
2
  import os
3
  import gradio as gr
4
  import torch
 
5
 
6
  if torch.cuda.is_available():
7
  device = "cuda"
@@ -14,6 +15,7 @@ else:
14
  subprocess.run(["git", "clone", "https://github.com/Nick088Official/Stable_Diffusion_Finetuned_Minecraft_Skin_Generator.git"])
15
  os.chdir("Stable_Diffusion_Finetuned_Minecraft_Skin_Generator")
16
 
 
17
  def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_scale, model_precision_type, seed, output_image_name, verbose):
18
  if stable_diffusion_model == '2':
19
  sd_model = "minecraft-skins"
 
2
  import os
3
  import gradio as gr
4
  import torch
5
+ import spaces
6
 
7
  if torch.cuda.is_available():
8
  device = "cuda"
 
15
  subprocess.run(["git", "clone", "https://github.com/Nick088Official/Stable_Diffusion_Finetuned_Minecraft_Skin_Generator.git"])
16
  os.chdir("Stable_Diffusion_Finetuned_Minecraft_Skin_Generator")
17
 
18
+ @spaces.GPU()
19
  def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_scale, model_precision_type, seed, output_image_name, verbose):
20
  if stable_diffusion_model == '2':
21
  sd_model = "minecraft-skins"