zhiweili
commited on
Commit
Β·
f4babe0
1
Parent(s):
a1553b6
test onediff
Browse files- app.py +1 -1
- app_onediff.py +4 -0
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
from
|
| 4 |
|
| 5 |
with gr.Blocks(css="style.css") as demo:
|
| 6 |
with gr.Tabs():
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
from app_onediff import create_demo as create_demo_face
|
| 4 |
|
| 5 |
with gr.Blocks(css="style.css") as demo:
|
| 6 |
with gr.Tabs():
|
app_onediff.py
CHANGED
|
@@ -2,6 +2,7 @@ import spaces
|
|
| 2 |
import gradio as gr
|
| 3 |
import time
|
| 4 |
import torch
|
|
|
|
| 5 |
|
| 6 |
from diffusers import (
|
| 7 |
DDPMScheduler,
|
|
@@ -9,6 +10,9 @@ from diffusers import (
|
|
| 9 |
AutoencoderTiny,
|
| 10 |
)
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
import oneflow as flow
|
| 13 |
from onediff.infer_compiler import oneflow_compile
|
| 14 |
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import time
|
| 4 |
import torch
|
| 5 |
+
import os
|
| 6 |
|
| 7 |
from diffusers import (
|
| 8 |
DDPMScheduler,
|
|
|
|
| 10 |
AutoencoderTiny,
|
| 11 |
)
|
| 12 |
|
| 13 |
+
os.system("pip install --pre oneflow -f https://github.com/siliconflow/oneflow_releases/releases/expanded_assets/community_cu122")
|
| 14 |
+
os.system("pip install --pre onediff")
|
| 15 |
+
|
| 16 |
import oneflow as flow
|
| 17 |
from onediff.infer_compiler import oneflow_compile
|
| 18 |
|