Update src/pipeline.py
Browse files- src/pipeline.py +3 -3
src/pipeline.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import torch
|
| 2 |
from PIL.Image import Image
|
| 3 |
-
from diffusers import
|
| 4 |
from sfast.compilers.diffusion_pipeline_compiler import (compile,
|
| 5 |
CompilationConfig)
|
| 6 |
from pipelines.models import TextToImageRequest
|
|
@@ -1252,7 +1252,7 @@ def load_pipeline() -> StableDiffusionXLPipeline:
|
|
| 1252 |
torch_dtype=torch.float16,
|
| 1253 |
local_files_only=True,
|
| 1254 |
)
|
| 1255 |
-
pipeline.scheduler = UniPCMultistepScheduler.from_config('./src',)
|
| 1256 |
pipeline.to("cuda")
|
| 1257 |
config = CompilationConfig.Default()
|
| 1258 |
try:
|
|
@@ -1286,5 +1286,5 @@ def infer(request: TextToImageRequest, pipeline: StableDiffusionXLPipeline) -> I
|
|
| 1286 |
width=request.width,
|
| 1287 |
height=request.height,
|
| 1288 |
generator=generator,
|
| 1289 |
-
num_inference_steps=
|
| 1290 |
).images[0]
|
|
|
|
| 1 |
import torch
|
| 2 |
from PIL.Image import Image
|
| 3 |
+
from diffusers import StableDiffusionXLPipeline
|
| 4 |
from sfast.compilers.diffusion_pipeline_compiler import (compile,
|
| 5 |
CompilationConfig)
|
| 6 |
from pipelines.models import TextToImageRequest
|
|
|
|
| 1252 |
torch_dtype=torch.float16,
|
| 1253 |
local_files_only=True,
|
| 1254 |
)
|
| 1255 |
+
# pipeline.scheduler = UniPCMultistepScheduler.from_config('./src',)
|
| 1256 |
pipeline.to("cuda")
|
| 1257 |
config = CompilationConfig.Default()
|
| 1258 |
try:
|
|
|
|
| 1286 |
width=request.width,
|
| 1287 |
height=request.height,
|
| 1288 |
generator=generator,
|
| 1289 |
+
num_inference_steps=20,
|
| 1290 |
).images[0]
|