Spaces:
Paused
Paused
Update app/main.py
#1
by
ahmedmbutt
- opened
- app/main.py +9 -8
app/main.py
CHANGED
@@ -40,14 +40,15 @@ async def lifespan(app: FastAPI):
|
|
40 |
"briaai/RMBG-1.4", trust_remote_code=True)
|
41 |
br_model.to(DEVICE)
|
42 |
|
43 |
-
sdxl_pipe = StableDiffusionXLPipeline.from_pretrained(
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
)
|
48 |
-
iv_model = IPAdapterXL(sdxl_pipe, image_encoder_path, ip_ckpt, DEVICE)
|
49 |
-
|
50 |
-
|
|
|
51 |
|
52 |
del ti_pipe
|
53 |
del ii_pipe
|
|
|
40 |
"briaai/RMBG-1.4", trust_remote_code=True)
|
41 |
br_model.to(DEVICE)
|
42 |
|
43 |
+
# sdxl_pipe = StableDiffusionXLPipeline.from_pretrained(
|
44 |
+
# base_model_path,
|
45 |
+
# torch_dtype=torch.float16,
|
46 |
+
# add_watermarker=False,
|
47 |
+
# )
|
48 |
+
# iv_model = IPAdapterXL(sdxl_pipe, image_encoder_path, ip_ckpt, DEVICE)
|
49 |
+
|
50 |
+
# , 'iv_model': iv_model
|
51 |
+
yield {'ti_pipe': ti_pipe, 'ii_pipe': ii_pipe, 'br_model': br_model}
|
52 |
|
53 |
del ti_pipe
|
54 |
del ii_pipe
|