Update src/pipeline.py
Browse files- src/pipeline.py +4 -4
src/pipeline.py
CHANGED
|
@@ -1241,7 +1241,7 @@ class StableDiffusionXLPipeline(
|
|
| 1241 |
|
| 1242 |
return StableDiffusionXLPipelineOutput(images=image)
|
| 1243 |
|
| 1244 |
-
from onediff.schedulers import EulerDiscreteScheduler
|
| 1245 |
from onediffx import compile_pipe
|
| 1246 |
|
| 1247 |
|
|
@@ -1252,8 +1252,8 @@ def load_pipeline(pipeline=None) -> StableDiffusionXLPipeline:
|
|
| 1252 |
torch_dtype=torch.float16,
|
| 1253 |
local_files_only=True,
|
| 1254 |
)
|
| 1255 |
-
|
| 1256 |
-
|
| 1257 |
|
| 1258 |
pipeline.to("cuda")
|
| 1259 |
pipeline = compile_pipe(pipeline)
|
|
@@ -1278,5 +1278,5 @@ def infer(request: TextToImageRequest, pipeline: StableDiffusionXLPipeline) -> I
|
|
| 1278 |
height=request.height,
|
| 1279 |
generator=generator,
|
| 1280 |
end_cfg=0.73,
|
| 1281 |
-
num_inference_steps=
|
| 1282 |
).images[0]
|
|
|
|
| 1241 |
|
| 1242 |
return StableDiffusionXLPipelineOutput(images=image)
|
| 1243 |
|
| 1244 |
+
#from onediff.schedulers import EulerDiscreteScheduler
|
| 1245 |
from onediffx import compile_pipe
|
| 1246 |
|
| 1247 |
|
|
|
|
| 1252 |
torch_dtype=torch.float16,
|
| 1253 |
local_files_only=True,
|
| 1254 |
)
|
| 1255 |
+
# pipeline.scheduler = EulerDiscreteScheduler.from_config(
|
| 1256 |
+
# pipeline.scheduler.config,)
|
| 1257 |
|
| 1258 |
pipeline.to("cuda")
|
| 1259 |
pipeline = compile_pipe(pipeline)
|
|
|
|
| 1278 |
height=request.height,
|
| 1279 |
generator=generator,
|
| 1280 |
end_cfg=0.73,
|
| 1281 |
+
num_inference_steps=20,
|
| 1282 |
).images[0]
|