Spaces:
Runtime error
Runtime error
root
commited on
Commit
·
7198296
1
Parent(s):
e3257fd
cog fixes
Browse files- predict.py +2 -1
predict.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
| 2 |
# https://github.com/replicate/cog/blob/main/docs/python.md
|
| 3 |
|
| 4 |
from cog import BasePredictor, Input, Path
|
|
|
|
| 5 |
from omni_zero import OmniZeroSingle
|
| 6 |
from PIL import Image
|
| 7 |
|
|
@@ -31,7 +32,7 @@ class Predictor(BasePredictor):
|
|
| 31 |
identity_image_strength: float = Input(description="Identity image strength for the model", default=1.0, ge=0.0, le=1.0),
|
| 32 |
depth_image: Path = Input(description="Depth image for the model", default=None),
|
| 33 |
depth_image_strength: float = Input(description="Depth image strength for the model, if not supplied the composition image will be used for depth", default=0.5, ge=0.0, le=1.0),
|
| 34 |
-
) -> Path:
|
| 35 |
"""Run a single prediction on the model"""
|
| 36 |
|
| 37 |
base_image = Image.open(base_image)
|
|
|
|
| 2 |
# https://github.com/replicate/cog/blob/main/docs/python.md
|
| 3 |
|
| 4 |
from cog import BasePredictor, Input, Path
|
| 5 |
+
from typing import List
|
| 6 |
from omni_zero import OmniZeroSingle
|
| 7 |
from PIL import Image
|
| 8 |
|
|
|
|
| 32 |
identity_image_strength: float = Input(description="Identity image strength for the model", default=1.0, ge=0.0, le=1.0),
|
| 33 |
depth_image: Path = Input(description="Depth image for the model", default=None),
|
| 34 |
depth_image_strength: float = Input(description="Depth image strength for the model, if not supplied the composition image will be used for depth", default=0.5, ge=0.0, le=1.0),
|
| 35 |
+
) -> List[Path]:
|
| 36 |
"""Run a single prediction on the model"""
|
| 37 |
|
| 38 |
base_image = Image.open(base_image)
|