Spaces:
Sleeping
Sleeping
Xiaoyu Xu
commited on
Commit
•
bdf4b6f
1
Parent(s):
242d59e
rename to onediff (#36)
Browse files- README.md +1 -1
- requirements.txt +1 -1
- server/config.py +3 -3
- server/pipelines/controlnet.py +2 -2
- server/pipelines/controlnetSDTurbo.py +2 -2
- server/pipelines/img2imgSDTurbo.py +2 -2
README.md
CHANGED
@@ -134,7 +134,7 @@ python server/main.py --reload --pipeline txt2imgLoraSDXL
|
|
134 |
* `--debug`: Print Inference time
|
135 |
* `--compel`: Compel option
|
136 |
* `--sfast`: Enable Stable Fast
|
137 |
-
* `--
|
138 |
|
139 |
If you run using `bash build-run.sh` you can set `PIPELINE` variables to choose the pipeline you want to run
|
140 |
|
|
|
134 |
* `--debug`: Print Inference time
|
135 |
* `--compel`: Compel option
|
136 |
* `--sfast`: Enable Stable Fast
|
137 |
+
* `--onediff`: Enable OneDiff
|
138 |
|
139 |
If you run using `bash build-run.sh` you can set `PIPELINE` variables to choose the pipeline you want to run
|
140 |
|
requirements.txt
CHANGED
@@ -13,4 +13,4 @@ xformers; sys_platform != 'darwin' or platform_machine != 'arm64'
|
|
13 |
markdown2
|
14 |
stable_fast @ https://github.com/chengzeyi/stable-fast/releases/download/v0.0.15.post1/stable_fast-0.0.15.post1+torch211cu121-cp310-cp310-manylinux2014_x86_64.whl
|
15 |
oneflow @ https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu121/794a56cc787217f46b21f5cbc84f65295664b82c/oneflow-0.9.1%2Bcu121.git.794a56c-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
16 |
-
git+https://github.com/
|
|
|
13 |
markdown2
|
14 |
stable_fast @ https://github.com/chengzeyi/stable-fast/releases/download/v0.0.15.post1/stable_fast-0.0.15.post1+torch211cu121-cp310-cp310-manylinux2014_x86_64.whl
|
15 |
oneflow @ https://oneflow-pro.oss-cn-beijing.aliyuncs.com/branch/community/cu121/794a56cc787217f46b21f5cbc84f65295664b82c/oneflow-0.9.1%2Bcu121.git.794a56c-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
16 |
+
git+https://github.com/siliconflow/onediff.git@main#egg=onediff
|
server/config.py
CHANGED
@@ -16,7 +16,7 @@ class Args(NamedTuple):
|
|
16 |
ssl_certfile: str
|
17 |
ssl_keyfile: str
|
18 |
sfast: bool
|
19 |
-
|
20 |
compel: bool = False
|
21 |
debug: bool = False
|
22 |
|
@@ -112,10 +112,10 @@ parser.add_argument(
|
|
112 |
help="Enable Stable Fast",
|
113 |
)
|
114 |
parser.add_argument(
|
115 |
-
"--
|
116 |
action="store_true",
|
117 |
default=False,
|
118 |
-
help="Enable
|
119 |
)
|
120 |
parser.set_defaults(taesd=USE_TAESD)
|
121 |
|
|
|
16 |
ssl_certfile: str
|
17 |
ssl_keyfile: str
|
18 |
sfast: bool
|
19 |
+
onediff: bool = False
|
20 |
compel: bool = False
|
21 |
debug: bool = False
|
22 |
|
|
|
112 |
help="Enable Stable Fast",
|
113 |
)
|
114 |
parser.add_argument(
|
115 |
+
"--onediff",
|
116 |
action="store_true",
|
117 |
default=False,
|
118 |
+
help="Enable OneDiff",
|
119 |
)
|
120 |
parser.set_defaults(taesd=USE_TAESD)
|
121 |
|
server/pipelines/controlnet.py
CHANGED
@@ -187,8 +187,8 @@ class Pipeline:
|
|
187 |
config.enable_cuda_graph = True
|
188 |
self.pipe = compile(self.pipe, config=config)
|
189 |
|
190 |
-
if args.
|
191 |
-
print("\nRunning
|
192 |
from onediff.infer_compiler import oneflow_compile
|
193 |
|
194 |
self.pipe.unet = oneflow_compile(self.pipe.unet)
|
|
|
187 |
config.enable_cuda_graph = True
|
188 |
self.pipe = compile(self.pipe, config=config)
|
189 |
|
190 |
+
if args.onediff:
|
191 |
+
print("\nRunning onediff compile\n")
|
192 |
from onediff.infer_compiler import oneflow_compile
|
193 |
|
194 |
self.pipe.unet = oneflow_compile(self.pipe.unet)
|
server/pipelines/controlnetSDTurbo.py
CHANGED
@@ -194,8 +194,8 @@ class Pipeline:
|
|
194 |
config.enable_cuda_graph = True
|
195 |
self.pipe = compile(self.pipe, config=config)
|
196 |
|
197 |
-
if args.
|
198 |
-
print("\nRunning
|
199 |
from onediff.infer_compiler import oneflow_compile
|
200 |
|
201 |
self.pipe.unet = oneflow_compile(self.pipe.unet)
|
|
|
194 |
config.enable_cuda_graph = True
|
195 |
self.pipe = compile(self.pipe, config=config)
|
196 |
|
197 |
+
if args.onediff:
|
198 |
+
print("\nRunning onediff compile\n")
|
199 |
from onediff.infer_compiler import oneflow_compile
|
200 |
|
201 |
self.pipe.unet = oneflow_compile(self.pipe.unet)
|
server/pipelines/img2imgSDTurbo.py
CHANGED
@@ -121,8 +121,8 @@ class Pipeline:
|
|
121 |
config.enable_cuda_graph = True
|
122 |
self.pipe = compile(self.pipe, config=config)
|
123 |
|
124 |
-
if args.
|
125 |
-
print("\nRunning
|
126 |
from onediff.infer_compiler import oneflow_compile
|
127 |
|
128 |
self.pipe.unet = oneflow_compile(self.pipe.unet)
|
|
|
121 |
config.enable_cuda_graph = True
|
122 |
self.pipe = compile(self.pipe, config=config)
|
123 |
|
124 |
+
if args.onediff:
|
125 |
+
print("\nRunning onediff compile\n")
|
126 |
from onediff.infer_compiler import oneflow_compile
|
127 |
|
128 |
self.pipe.unet = oneflow_compile(self.pipe.unet)
|