-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
113 lines (94 loc) · 4.83 KB
/
Copy path.env.example
File metadata and controls
113 lines (94 loc) · 4.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Copy to .env for local development: cp .env.example .env
#
# .env is gitignored. Anything already set in the real environment wins over
# this file, so on Heroku these are set with `heroku config:set` instead and
# .env is never deployed.
# --- Providers -------------------------------------------------------------
# Each phase independently: "mock" or "real".
# "real" loads providers/real/<name>.py — see docs/adding-a-provider.md.
PROVIDER_RIGGING=mock
PROVIDER_POSING=mock
PROVIDER_TRAINING=mock
# The real rigger is server-to-server. Set PROVIDER_RIGGING=real above to use
# the current prototype tunnel. Never expose this URL in browser code.
RIGGING_SERVICE_URL=https://carie-spatterdashed-vella.ngrok-free.dev
# One deadline for classification, augmentation, both queued jobs, and the GLB
# download.
RIGGING_SERVICE_TIMEOUT=300
RIGGING_POLL_INTERVAL=5
# --- Tuning ----------------------------------------------------------------
# Training episodes streamed per second at speed 1. The UI speed control
# multiplies this.
EPISODE_RATE=20
# Where uploaded sketches are written.
DATA_DIR=./data
# 8MB.
MAX_UPLOAD_BYTES=8388608
# --- AWS -------------------------------------------------------------------
# Read straight from the environment by boto3 and the AWS SDKs, so no code in
# this repo needs to touch them — set them here and a provider using Bedrock,
# S3 or SageMaker will pick them up.
#
# On Heroku set them with `heroku config:set AWS_ACCESS_KEY_ID=...` instead.
AWS_DEFAULT_REGION=eu-west-1
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# Only for temporary credentials from STS / SSO / an assumed role. Leave it
# unset for long-lived IAM keys — an empty or stale token is rejected outright,
# which surfaces as a confusing auth error rather than a missing-value one.
AWS_SESSION_TOKEN=
# --- Bedrock prompt endpoint -----------------------------------------------
# POST /api/llm/generate runs a prompt against a Bedrock model. It costs real
# money, so it is off until both of the next two vars are set.
#
# 1. The bearer token callers must present. Unset = the route returns 404.
# Generate one with: python -c "import secrets; print(secrets.token_urlsafe(32))"
# SERVER-SIDE ONLY. Never ship this to the browser — anything the browser
# holds is public, and this endpoint spends money.
LLM_API_TOKEN=
# 2. Which model IDs may be invoked, comma-separated. Empty refuses every
# model, so a half-configured deployment can't be pointed at an expensive
# one. IDs are account- and region-specific — list yours with:
# aws bedrock list-inference-profiles --region "$AWS_DEFAULT_REGION"
# aws bedrock list-foundation-models --region "$AWS_DEFAULT_REGION"
# Anthropic models are INFERENCE_PROFILE-only, so the bare ID
# (anthropic.claude-opus-5) will NOT invoke — use the profile ID, which
# carries a geography prefix: us. / eu. / apac. / global.
# Suffixes are not consistent between versions, so copy them from the list
# rather than typing them (Opus 4.6 ends -v1; Sonnet 4.6 does not).
#
# Listing a model does not mean you can invoke it — access is granted
# separately in the AWS console under Bedrock > Model access. A model you
# have not been granted returns AccessDeniedException at call time.
#
# e.g. BEDROCK_ALLOWED_MODELS=us.anthropic.claude-opus-5,us.anthropic.claude-sonnet-5
BEDROCK_ALLOWED_MODELS=
# Stability's image inference profiles below are US profiles.
BEDROCK_REGION=us-west-2
# Caps applied whatever the caller asks for.
BEDROCK_MAX_TOKENS=4096
BEDROCK_MAX_PROMPT_CHARS=20000
BEDROCK_TIMEOUT=60
# Per-caller and whole-deployment request caps. The daily one bounds the bill.
LLM_RATE_PER_MINUTE=10
LLM_RATE_PER_DAY=500
# --- T-pose feature (POST /api/avatars/<id>/tpose) -------------------------
# Also browser-facing, also costs real money — two Bedrock calls per request:
# a pose transform, then a background removal. Both models need "Model
# access" granted in the AWS console (Bedrock > Model access) or calls fail
# with AccessDeniedException.
# Stage 1 — redraws the avatar in a forward-facing T-pose. Stability's
# Control Sketch service, same family as BEDROCK_RENDER_MODEL_ID above.
BEDROCK_TPOSE_MODEL_ID=us.stability.stable-image-control-sketch-v1:0
# Stage 2 — strips the background to a real alpha channel. Stability's own
# Remove Background service, invoked the same way as BEDROCK_TPOSE_MODEL_ID.
BEDROCK_BG_REMOVAL_MODEL_ID=us.stability.stable-image-remove-background-v1:0
# Tighter than RENDER_RATE_PER_* since each call here is two Bedrock
# invocations rather than one.
TPOSE_RATE_PER_MINUTE=3
TPOSE_RATE_PER_DAY=30
# --- Other provider secrets ------------------------------------------------
# Nothing here is needed while all three providers are mocks. Uncomment what
# your implementation requires; keep real keys out of git.
# ANTHROPIC_API_KEY=sk-ant-...
OPENROUTER_API_KEY=