Spaces:
Sleeping
Sleeping
fix to work on OSX
Browse files
server/main.py
CHANGED
@@ -160,6 +160,8 @@ class App:
|
|
160 |
)
|
161 |
|
162 |
|
|
|
|
|
163 |
pipeline_class = get_pipeline_class(config.pipeline)
|
164 |
pipeline = pipeline_class(config, device, torch_dtype)
|
165 |
app = App(config, pipeline).app
|
|
|
160 |
)
|
161 |
|
162 |
|
163 |
+
print(f"Device: {device}")
|
164 |
+
print(f"torch_dtype: {torch_dtype}")
|
165 |
pipeline_class = get_pipeline_class(config.pipeline)
|
166 |
pipeline = pipeline_class(config, device, torch_dtype)
|
167 |
app = App(config, pipeline).app
|
server/pipelines/img2imgSDTurbo.py
CHANGED
@@ -14,10 +14,7 @@ from config import Args
|
|
14 |
from pydantic import BaseModel, Field
|
15 |
from PIL import Image
|
16 |
import math
|
17 |
-
|
18 |
-
compile,
|
19 |
-
CompilationConfig,
|
20 |
-
)
|
21 |
|
22 |
base_model = "stabilityai/sd-turbo"
|
23 |
taesd_model = "madebyollin/taesd"
|
@@ -109,6 +106,11 @@ class Pipeline:
|
|
109 |
).to(device)
|
110 |
|
111 |
if args.sfast:
|
|
|
|
|
|
|
|
|
|
|
112 |
print("\nRunning sfast compile\n")
|
113 |
from sfast.compilers.stable_diffusion_pipeline_compiler import (
|
114 |
compile,
|
|
|
14 |
from pydantic import BaseModel, Field
|
15 |
from PIL import Image
|
16 |
import math
|
17 |
+
|
|
|
|
|
|
|
18 |
|
19 |
base_model = "stabilityai/sd-turbo"
|
20 |
taesd_model = "madebyollin/taesd"
|
|
|
106 |
).to(device)
|
107 |
|
108 |
if args.sfast:
|
109 |
+
from sfast.compilers.stable_diffusion_pipeline_compiler import (
|
110 |
+
compile,
|
111 |
+
CompilationConfig,
|
112 |
+
)
|
113 |
+
|
114 |
print("\nRunning sfast compile\n")
|
115 |
from sfast.compilers.stable_diffusion_pipeline_compiler import (
|
116 |
compile,
|
requirements.txt → server/requirements.txt
RENAMED
@@ -11,6 +11,6 @@ controlnet-aux==0.0.7
|
|
11 |
peft==0.6.0
|
12 |
xformers; sys_platform != 'darwin' or platform_machine != 'arm64'
|
13 |
markdown2
|
14 |
-
stable_fast @ https://github.com/chengzeyi/stable-fast/releases/download/v1.0.2/stable_fast-1.0.2+torch211cu121-cp310-cp310-manylinux2014_x86_64.whl
|
15 |
-
oneflow @ https://github.com/siliconflow/oneflow_releases/releases/download/community_cu121/oneflow-0.9.1.dev20240123+cu121-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
|
16 |
-
git+https://github.com/siliconflow/onediff.git@main#egg=onediff
|
|
|
11 |
peft==0.6.0
|
12 |
xformers; sys_platform != 'darwin' or platform_machine != 'arm64'
|
13 |
markdown2
|
14 |
+
stable_fast @ https://github.com/chengzeyi/stable-fast/releases/download/v1.0.2/stable_fast-1.0.2+torch211cu121-cp310-cp310-manylinux2014_x86_64.whl; sys_platform != 'darwin' or platform_machine != 'arm64'
|
15 |
+
oneflow @ https://github.com/siliconflow/oneflow_releases/releases/download/community_cu121/oneflow-0.9.1.dev20240123+cu121-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; sys_platform != 'darwin' or platform_machine != 'arm64'
|
16 |
+
git+https://github.com/siliconflow/onediff.git@main#egg=onediff; sys_platform != 'darwin' or platform_machine != 'arm64'
|