Spaces:
Running
on
Zero
Running
on
Zero
root
commited on
Commit
•
00c2c78
1
Parent(s):
650b332
cog fixes
Browse files- .dockerignore +1 -0
- cog.yaml +3 -3
- predict.py +6 -6
.dockerignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
models
|
cog.yaml
CHANGED
@@ -6,9 +6,9 @@ build:
|
|
6 |
gpu: true
|
7 |
|
8 |
# a list of ubuntu apt packages to install
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
# python version in the form '3.8' or '3.8.12'
|
14 |
python_version: "3.11"
|
|
|
6 |
gpu: true
|
7 |
|
8 |
# a list of ubuntu apt packages to install
|
9 |
+
system_packages:
|
10 |
+
- "libgl1-mesa-glx"
|
11 |
+
- "libglib2.0-0"
|
12 |
|
13 |
# python version in the form '3.8' or '3.8.12'
|
14 |
python_version: "3.11"
|
predict.py
CHANGED
@@ -28,7 +28,7 @@ class Predictor(BasePredictor):
|
|
28 |
style_image_strength: float = Input(description="Style image strength for the model", default=1.0, ge=0.0, le=1.0),
|
29 |
identity_image: Path = Input(description="Identity image for the model"),
|
30 |
identity_image_strength: float = Input(description="Identity image strength for the model", default=1.0, ge=0.0, le=1.0),
|
31 |
-
depth_image: Path = Input(description="Depth image for the model"),
|
32 |
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),
|
33 |
) -> Path:
|
34 |
"""Run a single prediction on the model"""
|
@@ -39,15 +39,15 @@ class Predictor(BasePredictor):
|
|
39 |
guidance_scale=guidance_scale,
|
40 |
number_of_images=number_of_images,
|
41 |
number_of_steps=number_of_steps,
|
42 |
-
base_image=base_image,
|
43 |
base_image_strength=base_image_strength,
|
44 |
-
composition_image=composition_image,
|
45 |
composition_image_strength=composition_image_strength,
|
46 |
-
style_image=style_image,
|
47 |
style_image_strength=style_image_strength,
|
48 |
-
identity_image=identity_image,
|
49 |
identity_image_strength=identity_image_strength,
|
50 |
-
depth_image=depth_image,
|
51 |
depth_image_strength=depth_image_strength,
|
52 |
)
|
53 |
|
|
|
28 |
style_image_strength: float = Input(description="Style image strength for the model", default=1.0, ge=0.0, le=1.0),
|
29 |
identity_image: Path = Input(description="Identity image for the model"),
|
30 |
identity_image_strength: float = Input(description="Identity image strength for the model", default=1.0, ge=0.0, le=1.0),
|
31 |
+
depth_image: Path = Input(description="Depth image for the model", default=None),
|
32 |
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),
|
33 |
) -> Path:
|
34 |
"""Run a single prediction on the model"""
|
|
|
39 |
guidance_scale=guidance_scale,
|
40 |
number_of_images=number_of_images,
|
41 |
number_of_steps=number_of_steps,
|
42 |
+
base_image=str(base_image),
|
43 |
base_image_strength=base_image_strength,
|
44 |
+
composition_image=str(composition_image),
|
45 |
composition_image_strength=composition_image_strength,
|
46 |
+
style_image=str(style_image),
|
47 |
style_image_strength=style_image_strength,
|
48 |
+
identity_image=str(identity_image),
|
49 |
identity_image_strength=identity_image_strength,
|
50 |
+
depth_image=str(depth_image),
|
51 |
depth_image_strength=depth_image_strength,
|
52 |
)
|
53 |
|