Spaces:
Paused
Paused
Update app/main.py
Browse files- app/main.py +4 -2
app/main.py
CHANGED
@@ -39,7 +39,8 @@ async def lifespan(app: FastAPI):
|
|
39 |
ti_pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
40 |
ti_pipe.scheduler.config
|
41 |
)
|
42 |
-
ti_pipe.
|
|
|
43 |
|
44 |
ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
45 |
"timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None
|
@@ -47,7 +48,8 @@ async def lifespan(app: FastAPI):
|
|
47 |
ii_pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(
|
48 |
ii_pipe.scheduler.config
|
49 |
)
|
50 |
-
ii_pipe.
|
|
|
51 |
|
52 |
br_model = AutoModelForImageSegmentation.from_pretrained(
|
53 |
"briaai/RMBG-1.4", trust_remote_code=True
|
|
|
39 |
ti_pipe.scheduler = DPMSolverMultistepScheduler.from_config(
|
40 |
ti_pipe.scheduler.config
|
41 |
)
|
42 |
+
ti_pipe.to(DEVICE)
|
43 |
+
ti_pipe.enable_xformers_memory_efficient_attention()
|
44 |
|
45 |
ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
|
46 |
"timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None
|
|
|
48 |
ii_pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(
|
49 |
ii_pipe.scheduler.config
|
50 |
)
|
51 |
+
ii_pipe.to(DEVICE)
|
52 |
+
ii_pipe.enable_xformers_memory_efficient_attention()
|
53 |
|
54 |
br_model = AutoModelForImageSegmentation.from_pretrained(
|
55 |
"briaai/RMBG-1.4", trust_remote_code=True
|