Spaces:
Runtime error
Runtime error
show trace as gradio app. lmao smh.
Browse files- app.py +6 -2
- makeavid_sd/inference.py +1 -1
app.py
CHANGED
@@ -23,8 +23,12 @@ _model = InferenceUNetPseudo3D(
|
|
23 |
hf_auth_token = os.environ.get('HUGGING_FACE_HUB_TOKEN', None)
|
24 |
)
|
25 |
|
26 |
-
if _model.failed
|
27 |
-
|
|
|
|
|
|
|
|
|
28 |
|
29 |
# gradio is illiterate. type hints make it go poopoo in pantsu.
|
30 |
def generate(
|
|
|
23 |
hf_auth_token = os.environ.get('HUGGING_FACE_HUB_TOKEN', None)
|
24 |
)
|
25 |
|
26 |
+
if _model.failed != False:
|
27 |
+
trace = f'```{_model.failed}```'
|
28 |
+
with gr.Blocks(title = 'Make-A-Video Stable Diffusion JAX', analytics_enabled = False) as demo:
|
29 |
+
exception = gr.Markdown(trace)
|
30 |
+
|
31 |
+
demo.launch()
|
32 |
|
33 |
# gradio is illiterate. type hints make it go poopoo in pantsu.
|
34 |
def generate(
|
makeavid_sd/inference.py
CHANGED
@@ -84,8 +84,8 @@ class InferenceUNetPseudo3D:
|
|
84 |
del unet_params
|
85 |
except Exception as e:
|
86 |
print(e)
|
|
|
87 |
traceback.print_exc()
|
88 |
-
self.failed = True
|
89 |
return
|
90 |
self.failed = False
|
91 |
vae, vae_params = FlaxAutoencoderKL.from_pretrained(
|
|
|
84 |
del unet_params
|
85 |
except Exception as e:
|
86 |
print(e)
|
87 |
+
self.failed = ''.join(traceback.format_exception(None, e, e.__traceback__))
|
88 |
traceback.print_exc()
|
|
|
89 |
return
|
90 |
self.failed = False
|
91 |
vae, vae_params = FlaxAutoencoderKL.from_pretrained(
|