khawir commited on
Commit
691262e
1 Parent(s): b246ad5

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +2 -2
app/main.py CHANGED
@@ -39,7 +39,7 @@ async def lifespan(app: FastAPI):
39
  ti_pipe.scheduler = DPMSolverMultistepScheduler.from_config(
40
  ti_pipe.scheduler.config
41
  )
42
- ti_pipe.enable_model_cpu_offload() # to(DEVICE)
43
 
44
  ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
45
  "timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None
@@ -47,7 +47,7 @@ async def lifespan(app: FastAPI):
47
  ii_pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(
48
  ii_pipe.scheduler.config
49
  )
50
- ii_pipe.enable_model_cpu_offload() # to(DEVICE)
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.enable_sequential_cpu_offload() # to(DEVICE)
43
 
44
  ii_pipe = StableDiffusionInstructPix2PixPipeline.from_pretrained(
45
  "timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None
 
47
  ii_pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(
48
  ii_pipe.scheduler.config
49
  )
50
+ ii_pipe.enable_sequential_cpu_offload() # to(DEVICE)
51
 
52
  br_model = AutoModelForImageSegmentation.from_pretrained(
53
  "briaai/RMBG-1.4", trust_remote_code=True