Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -324,7 +324,7 @@ def infer_compo(style_description, ref_style_file, caption, ref_sub_file):
|
|
324 |
|
325 |
# Convert tensor to PIL Image before passing to sam_model.predict
|
326 |
x0_preview_pil = T.ToPILImage()(x0_preview[0])
|
327 |
-
sam_mask, boxes, phrases, logits = sam_model.predict(x0_preview_pil, sam_prompt)
|
328 |
sam_mask = sam_mask.detach().unsqueeze(dim=0).to(device)
|
329 |
|
330 |
conditions = core.get_conditions(batch, models_rbm, extras, is_eval=True, is_unconditional=False, eval_image_embeds=True, eval_subject_style=True, eval_csd=False)
|
|
|
324 |
|
325 |
# Convert tensor to PIL Image before passing to sam_model.predict
|
326 |
x0_preview_pil = T.ToPILImage()(x0_preview[0])
|
327 |
+
sam_mask, boxes, phrases, logits = sam_model.predict(transform(x0_preview_pil), sam_prompt)
|
328 |
sam_mask = sam_mask.detach().unsqueeze(dim=0).to(device)
|
329 |
|
330 |
conditions = core.get_conditions(batch, models_rbm, extras, is_eval=True, is_unconditional=False, eval_image_embeds=True, eval_subject_style=True, eval_csd=False)
|