Commit
·
9a42933
0
Parent(s):
initial commit
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .env +1 -0
- .eslintrc.json +3 -0
- .gitignore +37 -0
- .nvmrc +1 -0
- Dockerfile +65 -0
- README.md +11 -0
- TODO.md +7 -0
- components.json +16 -0
- next.config.js +11 -0
- package-lock.json +0 -0
- package.json +87 -0
- postcss.config.js +6 -0
- public/bubble.jpg +0 -0
- public/favicon.ico +0 -0
- public/favicon/Icon/r +0 -0
- public/favicon/favicon-114-precomposed.png +0 -0
- public/favicon/favicon-120-precomposed.png +0 -0
- public/favicon/favicon-144-precomposed.png +0 -0
- public/favicon/favicon-152-precomposed.png +0 -0
- public/favicon/favicon-180-precomposed.png +0 -0
- public/favicon/favicon-192.png +0 -0
- public/favicon/favicon-32.png +0 -0
- public/favicon/favicon-36.png +0 -0
- public/favicon/favicon-48.png +0 -0
- public/favicon/favicon-57.png +0 -0
- public/favicon/favicon-60.png +0 -0
- public/favicon/favicon-72-precomposed.png +0 -0
- public/favicon/favicon-72.png +0 -0
- public/favicon/favicon-76.png +0 -0
- public/favicon/favicon-96.png +0 -0
- public/favicon/favicon.ico +0 -0
- public/favicon/manifest.json +41 -0
- public/icon.png +0 -0
- public/images/hf.png +0 -0
- public/images/mock-avatar.jpeg +0 -0
- public/images/sprite.png +0 -0
- public/layouts/layout0.jpg +0 -0
- public/layouts/layout0_hd.jpg +0 -0
- public/layouts/layout1.jpg +0 -0
- public/layouts/layout1_hd.jpg +0 -0
- public/layouts/layout2.jpg +0 -0
- public/layouts/layout2_hd.jpg +0 -0
- public/layouts/layout3 hd.jpg +0 -0
- public/layouts/layout3.jpg +0 -0
- public/mask.png +0 -0
- public/next.svg +1 -0
- public/vercel.svg +1 -0
- src/app/favicon.ico +0 -0
- src/app/globals.css +39 -0
- src/app/icon.png +0 -0
.env
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
HF_HOTSHOT_XL_API_URL="https://jbilcke-hf-hotshot-xl-api.hf.space/"
|
.eslintrc.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"extends": "next/core-web-vitals"
|
3 |
+
}
|
.gitignore
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
2 |
+
|
3 |
+
# dependencies
|
4 |
+
/node_modules
|
5 |
+
/.pnp
|
6 |
+
.pnp.js
|
7 |
+
|
8 |
+
# testing
|
9 |
+
/coverage
|
10 |
+
|
11 |
+
# next.js
|
12 |
+
/.next/
|
13 |
+
/out/
|
14 |
+
|
15 |
+
# production
|
16 |
+
/build
|
17 |
+
|
18 |
+
# misc
|
19 |
+
.DS_Store
|
20 |
+
*.pem
|
21 |
+
|
22 |
+
# debug
|
23 |
+
npm-debug.log*
|
24 |
+
yarn-debug.log*
|
25 |
+
yarn-error.log*
|
26 |
+
|
27 |
+
# local env files
|
28 |
+
.env*.local
|
29 |
+
|
30 |
+
# vercel
|
31 |
+
.vercel
|
32 |
+
|
33 |
+
# typescript
|
34 |
+
*.tsbuildinfo
|
35 |
+
next-env.d.ts
|
36 |
+
|
37 |
+
/sandbox/
|
.nvmrc
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
v18.16.0
|
Dockerfile
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:18-alpine AS base
|
2 |
+
|
3 |
+
# Install dependencies only when needed
|
4 |
+
FROM base AS deps
|
5 |
+
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
6 |
+
RUN apk add --no-cache libc6-compat
|
7 |
+
WORKDIR /app
|
8 |
+
|
9 |
+
# Install dependencies based on the preferred package manager
|
10 |
+
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
11 |
+
RUN \
|
12 |
+
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
|
13 |
+
elif [ -f package-lock.json ]; then npm ci; \
|
14 |
+
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
|
15 |
+
else echo "Lockfile not found." && exit 1; \
|
16 |
+
fi
|
17 |
+
|
18 |
+
# Uncomment the following lines if you want to use a secret at buildtime,
|
19 |
+
# for example to access your private npm packages
|
20 |
+
# RUN --mount=type=secret,id=HF_EXAMPLE_SECRET,mode=0444,required=true \
|
21 |
+
# $(cat /run/secrets/HF_EXAMPLE_SECRET)
|
22 |
+
|
23 |
+
# Rebuild the source code only when needed
|
24 |
+
FROM base AS builder
|
25 |
+
WORKDIR /app
|
26 |
+
COPY --from=deps /app/node_modules ./node_modules
|
27 |
+
COPY . .
|
28 |
+
|
29 |
+
# Next.js collects completely anonymous telemetry data about general usage.
|
30 |
+
# Learn more here: https://nextjs.org/telemetry
|
31 |
+
# Uncomment the following line in case you want to disable telemetry during the build.
|
32 |
+
# ENV NEXT_TELEMETRY_DISABLED 1
|
33 |
+
|
34 |
+
# RUN yarn build
|
35 |
+
|
36 |
+
# If you use yarn, comment out this line and use the line above
|
37 |
+
RUN npm run build
|
38 |
+
|
39 |
+
# Production image, copy all the files and run next
|
40 |
+
FROM base AS runner
|
41 |
+
WORKDIR /app
|
42 |
+
|
43 |
+
ENV NODE_ENV production
|
44 |
+
# Uncomment the following line in case you want to disable telemetry during runtime.
|
45 |
+
# ENV NEXT_TELEMETRY_DISABLED 1
|
46 |
+
|
47 |
+
RUN addgroup --system --gid 1001 nodejs
|
48 |
+
RUN adduser --system --uid 1001 nextjs
|
49 |
+
|
50 |
+
COPY --from=builder /app/public ./public
|
51 |
+
|
52 |
+
# Automatically leverage output traces to reduce image size
|
53 |
+
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
54 |
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
55 |
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
56 |
+
COPY --from=builder --chown=nextjs:nodejs /app/.next/cache ./.next/cache
|
57 |
+
# COPY --from=builder --chown=nextjs:nodejs /app/.next/cache/fetch-cache ./.next/cache/fetch-cache
|
58 |
+
|
59 |
+
USER nextjs
|
60 |
+
|
61 |
+
EXPOSE 3000
|
62 |
+
|
63 |
+
ENV PORT 3000
|
64 |
+
|
65 |
+
CMD ["node", "server.js"]
|
README.md
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Hotshot-XL Text-to-GIF
|
3 |
+
emoji: 🤙
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: yellow
|
6 |
+
sdk: docker
|
7 |
+
pinned: true
|
8 |
+
app_port: 3000
|
9 |
+
---
|
10 |
+
|
11 |
+
# Hotshot-XL Text-to-GIF
|
TODO.md
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Find a name (hotshot factory? gipher? gif factory? fun factory?)
|
2 |
+
|
3 |
+
Allow browsing some loras
|
4 |
+
|
5 |
+
Funny use cases to try:
|
6 |
+
- Hugging Face
|
7 |
+
- Zelda 64 (will be a bit more tricky since it uses some custom Replicate stuff)
|
components.json
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"$schema": "https://ui.shadcn.com/schema.json",
|
3 |
+
"style": "default",
|
4 |
+
"rsc": true,
|
5 |
+
"tsx": true,
|
6 |
+
"tailwind": {
|
7 |
+
"config": "tailwind.config.js",
|
8 |
+
"css": "app/globals.css",
|
9 |
+
"baseColor": "stone",
|
10 |
+
"cssVariables": false
|
11 |
+
},
|
12 |
+
"aliases": {
|
13 |
+
"components": "@/components",
|
14 |
+
"utils": "@/lib/utils"
|
15 |
+
}
|
16 |
+
}
|
next.config.js
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/** @type {import('next').NextConfig} */
|
2 |
+
const nextConfig = {
|
3 |
+
output: 'standalone',
|
4 |
+
|
5 |
+
experimental: {
|
6 |
+
serverActions: true,
|
7 |
+
serverActionsBodySizeLimit: '8mb',
|
8 |
+
},
|
9 |
+
}
|
10 |
+
|
11 |
+
module.exports = nextConfig
|
package-lock.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
package.json
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "@jbilcke-hf/hotshot-xl-text-to-gif",
|
3 |
+
"version": "0.0.0",
|
4 |
+
"private": true,
|
5 |
+
"scripts": {
|
6 |
+
"dev": "next dev",
|
7 |
+
"build": "next build",
|
8 |
+
"start": "next start",
|
9 |
+
"lint": "next lint"
|
10 |
+
},
|
11 |
+
"dependencies": {
|
12 |
+
"@huggingface/inference": "^2.6.1",
|
13 |
+
"@photo-sphere-viewer/core": "^5.1.7",
|
14 |
+
"@photo-sphere-viewer/markers-plugin": "^5.1.7",
|
15 |
+
"@photo-sphere-viewer/video-plugin": "^5.1.7",
|
16 |
+
"@photo-sphere-viewer/virtual-tour-plugin": "^5.1.7",
|
17 |
+
"@radix-ui/react-accordion": "^1.1.2",
|
18 |
+
"@radix-ui/react-avatar": "^1.0.3",
|
19 |
+
"@radix-ui/react-checkbox": "^1.0.4",
|
20 |
+
"@radix-ui/react-collapsible": "^1.0.3",
|
21 |
+
"@radix-ui/react-dialog": "^1.0.4",
|
22 |
+
"@radix-ui/react-dropdown-menu": "^2.0.5",
|
23 |
+
"@radix-ui/react-icons": "^1.3.0",
|
24 |
+
"@radix-ui/react-label": "^2.0.2",
|
25 |
+
"@radix-ui/react-menubar": "^1.0.3",
|
26 |
+
"@radix-ui/react-popover": "^1.0.6",
|
27 |
+
"@radix-ui/react-select": "^1.2.2",
|
28 |
+
"@radix-ui/react-separator": "^1.0.3",
|
29 |
+
"@radix-ui/react-slider": "^1.1.2",
|
30 |
+
"@radix-ui/react-slot": "^1.0.2",
|
31 |
+
"@radix-ui/react-switch": "^1.0.3",
|
32 |
+
"@radix-ui/react-toast": "^1.1.4",
|
33 |
+
"@radix-ui/react-tooltip": "^1.0.6",
|
34 |
+
"@react-pdf/renderer": "^3.1.12",
|
35 |
+
"@react-spring/web": "^9.7.3",
|
36 |
+
"@types/node": "20.4.2",
|
37 |
+
"@types/react": "18.2.15",
|
38 |
+
"@types/react-dom": "18.2.7",
|
39 |
+
"@types/uuid": "^9.0.2",
|
40 |
+
"autoprefixer": "10.4.14",
|
41 |
+
"class-variance-authority": "^0.6.1",
|
42 |
+
"clsx": "^2.0.0",
|
43 |
+
"cmdk": "^0.2.0",
|
44 |
+
"cookies-next": "^2.1.2",
|
45 |
+
"date-fns": "^2.30.0",
|
46 |
+
"eslint": "8.45.0",
|
47 |
+
"eslint-config-next": "13.4.10",
|
48 |
+
"html2canvas": "^1.4.1",
|
49 |
+
"lucide-react": "^0.260.0",
|
50 |
+
"moodie": "^1.1.1",
|
51 |
+
"nanoid": "^5.0.1",
|
52 |
+
"next": "13.4.10",
|
53 |
+
"photo-sphere-viewer-lensflare-plugin": "^1.1.1",
|
54 |
+
"pick": "^0.0.1",
|
55 |
+
"postcss": "8.4.26",
|
56 |
+
"proper-lockfile": "^4.1.2",
|
57 |
+
"react": "18.2.0",
|
58 |
+
"react-circular-progressbar": "^2.1.0",
|
59 |
+
"react-dom": "18.2.0",
|
60 |
+
"react-photo-sphere-viewer": "^3.3.5-psv5.1.4",
|
61 |
+
"react-qr-code": "^2.0.12",
|
62 |
+
"react-snowfall": "^1.2.1",
|
63 |
+
"react-virtualized-auto-sizer": "^1.0.20",
|
64 |
+
"replicate": "^0.17.0",
|
65 |
+
"sbd": "^1.0.19",
|
66 |
+
"sharp": "^0.32.5",
|
67 |
+
"styled-components": "^6.0.7",
|
68 |
+
"tailwind-merge": "^1.13.2",
|
69 |
+
"tailwindcss": "3.3.3",
|
70 |
+
"tailwindcss-animate": "^1.0.6",
|
71 |
+
"temp-dir": "^3.0.0",
|
72 |
+
"tesseract.js": "^4.1.2",
|
73 |
+
"ts-node": "^10.9.1",
|
74 |
+
"typescript": "5.1.6",
|
75 |
+
"unique-names-generator": "^4.7.1",
|
76 |
+
"usehooks-ts": "^2.9.1",
|
77 |
+
"uuid": "^9.0.0",
|
78 |
+
"zustand": "^4.4.1"
|
79 |
+
},
|
80 |
+
"devDependencies": {
|
81 |
+
"@types/proper-lockfile": "^4.1.2",
|
82 |
+
"@types/qs": "^6.9.7",
|
83 |
+
"@types/react-virtualized": "^9.21.22",
|
84 |
+
"@types/sbd": "^1.0.3",
|
85 |
+
"daisyui": "^3.7.4"
|
86 |
+
}
|
87 |
+
}
|
postcss.config.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
module.exports = {
|
2 |
+
plugins: {
|
3 |
+
tailwindcss: {},
|
4 |
+
autoprefixer: {},
|
5 |
+
},
|
6 |
+
}
|
public/bubble.jpg
ADDED
![]() |
public/favicon.ico
ADDED
|
public/favicon/Icon/r
ADDED
File without changes
|
public/favicon/favicon-114-precomposed.png
ADDED
![]() |
public/favicon/favicon-120-precomposed.png
ADDED
![]() |
public/favicon/favicon-144-precomposed.png
ADDED
![]() |
public/favicon/favicon-152-precomposed.png
ADDED
![]() |
public/favicon/favicon-180-precomposed.png
ADDED
![]() |
public/favicon/favicon-192.png
ADDED
![]() |
public/favicon/favicon-32.png
ADDED
![]() |
public/favicon/favicon-36.png
ADDED
![]() |
public/favicon/favicon-48.png
ADDED
![]() |
public/favicon/favicon-57.png
ADDED
![]() |
public/favicon/favicon-60.png
ADDED
![]() |
public/favicon/favicon-72-precomposed.png
ADDED
![]() |
public/favicon/favicon-72.png
ADDED
![]() |
public/favicon/favicon-76.png
ADDED
![]() |
public/favicon/favicon-96.png
ADDED
![]() |
public/favicon/favicon.ico
ADDED
|
public/favicon/manifest.json
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "pollo",
|
3 |
+
"icons": [
|
4 |
+
{
|
5 |
+
"src": "\/favicon-36.png",
|
6 |
+
"sizes": "36x36",
|
7 |
+
"type": "image\/png",
|
8 |
+
"density": 0.75
|
9 |
+
},
|
10 |
+
{
|
11 |
+
"src": "\/favicon-48.png",
|
12 |
+
"sizes": "48x48",
|
13 |
+
"type": "image\/png",
|
14 |
+
"density": 1
|
15 |
+
},
|
16 |
+
{
|
17 |
+
"src": "\/favicon-72.png",
|
18 |
+
"sizes": "72x72",
|
19 |
+
"type": "image\/png",
|
20 |
+
"density": 1.5
|
21 |
+
},
|
22 |
+
{
|
23 |
+
"src": "\/favicon-96.png",
|
24 |
+
"sizes": "96x96",
|
25 |
+
"type": "image\/png",
|
26 |
+
"density": 2
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"src": "\/favicon-144.png",
|
30 |
+
"sizes": "144x144",
|
31 |
+
"type": "image\/png",
|
32 |
+
"density": 3
|
33 |
+
},
|
34 |
+
{
|
35 |
+
"src": "\/favicon-192.png",
|
36 |
+
"sizes": "192x192",
|
37 |
+
"type": "image\/png",
|
38 |
+
"density": 4
|
39 |
+
}
|
40 |
+
]
|
41 |
+
}
|
public/icon.png
ADDED
![]() |
public/images/hf.png
ADDED
![]() |
public/images/mock-avatar.jpeg
ADDED
![]() |
public/images/sprite.png
ADDED
![]() |
public/layouts/layout0.jpg
ADDED
![]() |
public/layouts/layout0_hd.jpg
ADDED
![]() |
public/layouts/layout1.jpg
ADDED
![]() |
public/layouts/layout1_hd.jpg
ADDED
![]() |
public/layouts/layout2.jpg
ADDED
![]() |
public/layouts/layout2_hd.jpg
ADDED
![]() |
public/layouts/layout3 hd.jpg
ADDED
![]() |
public/layouts/layout3.jpg
ADDED
![]() |
public/mask.png
ADDED
![]() |
public/next.svg
ADDED
|
public/vercel.svg
ADDED
|
src/app/favicon.ico
ADDED
|
src/app/globals.css
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@tailwind base;
|
2 |
+
@tailwind components;
|
3 |
+
@tailwind utilities;
|
4 |
+
|
5 |
+
:root {
|
6 |
+
--foreground-rgb: 0, 0, 0;
|
7 |
+
--background-start-rgb: 214, 219, 220;
|
8 |
+
--background-end-rgb: 255, 255, 255;
|
9 |
+
}
|
10 |
+
|
11 |
+
@media (prefers-color-scheme: dark) {
|
12 |
+
:root {
|
13 |
+
--foreground-rgb: 255, 255, 255;
|
14 |
+
--background-start-rgb: 0, 0, 0;
|
15 |
+
--background-end-rgb: 0, 0, 0;
|
16 |
+
}
|
17 |
+
}
|
18 |
+
|
19 |
+
body {
|
20 |
+
color: rgb(var(--foreground-rgb));
|
21 |
+
background: linear-gradient(
|
22 |
+
to bottom,
|
23 |
+
transparent,
|
24 |
+
rgb(var(--background-end-rgb))
|
25 |
+
)
|
26 |
+
rgb(var(--background-start-rgb));
|
27 |
+
}
|
28 |
+
|
29 |
+
|
30 |
+
/* this is the trick to bypass the style={{}} attribute when printing */
|
31 |
+
@media print {
|
32 |
+
.comic-page[style] { width: 100vw !important; }
|
33 |
+
}
|
34 |
+
|
35 |
+
|
36 |
+
.render-to-image .comic-panel {
|
37 |
+
height: auto !important;
|
38 |
+
/* max-width: fit-content !important; */
|
39 |
+
}
|
src/app/icon.png
ADDED
![]() |