fix(heal): genuine spot healing exemplar patch transfer & self-contained LaMa AI server in docker

This commit is contained in:
2026-10-16 22:42:21 +07:00
parent 90cba9592a
commit 2761d4f5a3
6 changed files with 120 additions and 181 deletions
+4 -1
View File
@@ -11,10 +11,13 @@ RUN npm run build && npm prune --omit=dev
FROM node:22-slim
ENV NODE_ENV=production \
PORT=3000 \
DATA_DIR=/data
DATA_DIR=/data \
INPAINT_MODEL_PATH=/app/models/lama_fp32.onnx
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/dist ./dist
COPY package.json ./
COPY models ./models
RUN ln -sf /app/models /models
EXPOSE 3000
CMD ["node", "dist/server.js"]
+3 -3
View File
@@ -10,11 +10,11 @@ export async function getInpaintSession(): Promise<ort.InferenceSession | null>
sessionPromise = (async () => {
const candidates = [
MODEL_PATH,
'/app/models/lama_fp32.onnx',
'/models/lama_fp32.onnx',
'./models/lama_fp32.onnx',
'/home/locpham/RecipesCam/docker/frontend/public/models/lama_fp32.onnx',
'../frontend/public/models/lama_fp32.onnx',
'./models/lama_fp32.onnx',
'/models/lama_fp32.onnx',
'/models/migan_pipeline_v2.onnx',
];
let foundPath: string | null = null;
for (const p of candidates) {