You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/replicate/SKILL.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,10 @@ Models take time to run. There are three ways to run a model via API and get its
44
44
Follow these guideliness when running models:
45
45
46
46
- Use the "POST /v1/predictions" endpoint, as it supports both official and community models.
47
-
- Every model has its own OpenAPI schema. Always fetch and check model schemas to make sure you're setting valid inputs.
47
+
- Every model has its own OpenAPI schema. Always fetch and check model schemas to make sure you're setting valid inputs. Even popular models change their schemas.
48
+
- Validate input parameters against schema constraints (minimum, maximum, enum values). Don't generate values that violate them.
49
+
- When unsure about a parameter value, use the model's default example or omit the optional parameter.
50
+
- Don't set optional inputs unless you have a reason to. Stick to the required inputs and let the model's defaults do the work.
48
51
- Use HTTPS URLs for file inputs whenever possible. You can also send base64-encoded files, but they should be avoided.
49
52
- Fire off multiple predictions concurrently. Don't wait for one to finish before starting the next.
50
53
- Output file URLs expire after 1 hour, so back them up if you need to keep them, using a service like Cloudflare R2.
0 commit comments