Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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"
|