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 |
import spaces
|
6 |
|
7 |
|
@@ -33,7 +34,6 @@ def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_
|
|
33 |
|
34 |
# view it in 3d or not
|
35 |
if see_in_3d:
|
36 |
-
from PIL import Image, ImageEnhance
|
37 |
from pygltflib import GLTF2
|
38 |
from pygltflib.utils import ImageFormat, Texture, Material, Image as GLTFImage
|
39 |
os.chdir("Scripts")
|
@@ -54,7 +54,7 @@ guidance_scale = gr.Number(minimum=0.1, value=7.5, label="Guidance Scale", info=
|
|
54 |
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 gives better results")
|
55 |
seed = gr.Number(value=42, label="Seed", info="A starting point to initiate generation, put 0 for a random one")
|
56 |
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")
|
57 |
-
see_in_3d = gr.Checkbox(label="See in 3D", info="View the generated skin
|
58 |
verbose = gr.Checkbox(label="Verbose Output", info="Produce more detailed output while running", value=False)
|
59 |
|
60 |
|
|
|
2 |
import os
|
3 |
import gradio as gr
|
4 |
import torch
|
5 |
+
from PIL import Image, ImageEnhance
|
6 |
import spaces
|
7 |
|
8 |
|
|
|
34 |
|
35 |
# view it in 3d or not
|
36 |
if see_in_3d:
|
|
|
37 |
from pygltflib import GLTF2
|
38 |
from pygltflib.utils import ImageFormat, Texture, Material, Image as GLTFImage
|
39 |
os.chdir("Scripts")
|
|
|
54 |
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 gives better results")
|
55 |
seed = gr.Number(value=42, label="Seed", info="A starting point to initiate generation, put 0 for a random one")
|
56 |
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")
|
57 |
+
see_in_3d = gr.Checkbox(label="See in 3D", info="View the generated skin as a Β£D Model", value=True)
|
58 |
verbose = gr.Checkbox(label="Verbose Output", info="Produce more detailed output while running", value=False)
|
59 |
|
60 |
|