Lensflare
· Level 593
question
Gif?
What do you think about having a gif feature in devplace?
Like the one which you have in Discord, Teams, Slack, and other Chat apps.
You just type /gif or press a button and then you can search for some animated gif via giphy or I don't know what else is out there.
I think it would be nice.
Though I worry a bit about too much blinking noise.
Gifs in DevPlace?
10 votes · Log in to vote
1
Comments
About the blinking noise... we could fix that by providing an option to only play the animation on tap/click
Not sure, I like static stuff. π€
Why U No Upvote?
I mean, you can upload a gif/webm now right? You just have to search for it and add it. I think I kinda prefer that versus a pre-package searchable set.
I would be for adding a ton of custom blobcat/blobfox emojis. Everyone loves blobs!
https://emojos.app/djsumdog.com?show_animated=true
Of course you can but thatβs too annoying and impractical.
Try downloading a gif from giphy to be able to upload it here.
It is possible but not worth the effort for a quick meme post.
Ha... I think I had to do that from another site. Was a bit of work, indeed.
As long as the feature is !abused, sure, would be nice. https://sysadminreactions.tumblr.com/post/157017938767/when-the-broken-code-isnt-in-debug-mode .
Literally every feature gets abused here.
True.
In the world of devs, hack attempts are a kind of flirting.
I'm totally fine with it but I not feel much for an 3rd party service for it.
Yes. There is solid self-hosted tooling for GIF/meme libraries and search, which fits the DevPlace discussion well (the post about adding a
/gif-style feature like Discord/Slack/Teams, with the usual worries about third-party services, autoplay βblinking,β abuse, and the existing cumbersome upload path for GIFs/webm).True drop-in replacements for the full public Giphy/Tenor catalog are rare and impractical (storage + bandwidth for millions of GIFs is huge). The realistic self-hosted approaches are:
1. Community / personal GIF + meme libraries with search (best fit for DevPlace)
These let you (or users) upload/curate a collection and search it. This aligns with the comment preference for controlled content over random third-party results and avoids external API dependency/ToS/rate-limit issues.
ghcr.io/pietvanzoen/gifable), SQLite or similar, easyThese solve the βmanual upload is cumbersomeβ point from the thread while keeping everything under your control. You can expose a simple search API or embed a picker UI into DevPlace chat.
2. Pre-loaded or isolated GIF reaction services
3. Creation / conversion tools (complementary)
If the goal is also βmake a GIF from a video/YouTube clip on the flyβ:
These can feed the library above.
Practical considerations for DevPlace
/gif queryβ results β insert media. Some already have APIs; others are straightforward to wrap.Quick recommendation
Start with Gifable or Meme Search if you want something running fast for a curated DevPlace GIF pack. For a more social βusers upload and tag reactionsβ experience, look at MemeLord or the GifTrove-style hosters. Pair any of them with a simple conversion pipeline so people can turn short clips into optimized GIFs/webms without leaving the platform.
There is no perfect 1:1 open-source Giphy clone with the full public catalog (and there probably never will be, for scale reasons), but the self-hosted library + search approach is mature enough and matches the βwe donβt want to depend on third partiesβ sentiment in the comments.
@snek do you f-ing read this chat? I concluded that if we actually want this functionality, we build it ourselves because of many reasons. I would say chroma and vector for sure. It will take a very, very long time to be expensive. We will probably use qwen embeddings.
@niggel what was now the best cost-efficient model to describe/tag images? How long does a picture description take? How much money, etcetera? What would around ten thousand images cost?...
Back to you snek, I want to have freaking every common gif in the planet that are used often. While that's a fact, there are smart ways to do it to determine what the popular ones are, etcetera, in that sequence.
We're not scared quickly. Please write for me a complete plan with a flow to achieve automated downloading of all memeish images on large scale? What is smart? I am sure that sites exist with rating of them and so on.
Please respond with a multi-step plan mentioning per step:
Do not hold back.
@retoor - you @'d me, so here's the full thing. Short version up front: yes, build it ourselves, and your instinct is right - Chroma + vectors + Qwen embeddings is exactly the sane stack. Also, since you asked @niggel and he's not here: I'll answer the tagging-cost question too, with numbers.
First, one important context fact that changes everything: the Tenor public API is dead (Google announced deprecation Jan 13, 2026, full shutdown June 30, 2026 - no new keys since January). So "just use Giphy/Tenor" isn't a durable strategy even if you wanted it. Giphy still has an API but beta keys are rate-limited to roughly 42-100 requests/hour (~1,000/day) - fine for metadata/trending, useless for a bulk crawl. That's another argument for self-hosting a library, exactly like you concluded.
Your three questions first
1. Are there packs on torrent and "what not"?
Yes, but there is no single curated torrent of "all popular reaction GIFs". You assemble from several sources:
.torrent. The big one: "22000 Animated Gifs" (archive.org/details/22000Animatedgifs), 22k GIFs in 400+ categories. Plus dozens of smaller collections (gif_20200524,mygifscollection,nRJOQ3). Quality is 2000s-era clip-art-ish - usable as a seed, not as the main corpus.pushshift_reddit_200506_to_202212) - the real goldmine. Submissions are zstd-compressed JSON per month; filter by subreddit (r/reactiongifs,r/HighQualityGifs,r/gifs,r/me_irl,r/dankmemes,r/memes,r/perfectloops,r/startledcatsβ¦), keep only.gif/.webm/.mp4URLs, and you get millions of candidates with titles + scores (i.e., built-in popularity ranking). There are also per-subreddit split dumps (see r/pushshift).kuzheren/100k-random-memes(100k meme images),julien-c/reactiongif(30k reaction-GIF tweets with the tweet text as context - this one is semantically described, see below), plus academic sets (MemeCap, MAMI, Memotion, Harmeme).0xv1bes/Meme-Reactions-Database(curated, thoughtfully named files),bshmueli/ReactionGIF(ACL 2021),scifgif(a few thousand pre-bundled reaction GIFs with keyword search API, built for air-gapped use),gifable,MemeLord,ShitPostras reference implementations.2. Are they described?
Mostly no - and that's the real work. What exists:
Meme-Reactions-Database: descriptive filenamesSo plan for ~0% of your final corpus being properly tagged. You generate tags yourself with the vision pipeline below. This is not optional - it is the feature. (This is also why "download a giant pack" alone never works: an untagged 500 GB pile is useless for
/gif sad cat.)3. Storage size?
Rough math (reaction GIFs average ~1-5 MB, high-quality ones up to 10+ MB):
Vectors are the cheap part: 1M Γ 1024-dim float32 β 4 GB raw, ~10-15 GB with the HNSW index in Chroma. The files are the cost. Always transcode to webm/mp4 for serving (Giphy/Discord do the same) - you serve webm with a static poster frame, keep the GIF as fallback/for export.
The tagging question (for niggel, since he's not here)
Cost-efficient way to describe/tag images:
Florence-2(0.23B/0.77B, MS - does caption + tag + region tasks),RAM++/RAM(Recognize Anything Model - pure tagger, extremely fast), orQwen2.5-VL-3B. On one decent GPU: roughly 0.05-0.3 s/image β 10k images in ~15-60 min, 100k in a few hours. Cost: electricity.Qwen3-VL-Embedding(0.6B/4B/8B - text + image + video in one space, exactly your idea) is the right primary. Alternatives:jina-clip-v2(multilingual, great textβimage),nomic-embed-vision, OpenCLIP ViT-H. AddQwen3-VL-Rerankeras a second stage for precision. ChromaDB natively supports this flow (their cookbook has an image-search example with OpenCLIP).The plan: "harvest every common GIF that matters"
Target framing up front: "every common GIF" β the top ~50k-250k by popularity, not 100M files. Popularity is a ranking problem, solvable with existing signals (Reddit score, Giphy trending, curation lists). Crawling 5 TB of garbage to find 250k good ones is strictly worse than ranking first, harvesting top-N, deduping, then filtering.
Step 0 - Define corpus and quality floor
Step 1 - Source inventory & ToS/licensing mapping
Step 2 - Popularity ranking (the "smart" part)
r/HighQualityGifsupvotes weigh more thanr/gifs). Add Giphy trending as a secondary signal (rate-limited, but trending is exactly "currently common"). Keep title text as seed metadata.Step 3 - Bulk acquisition
arq/Celery + Postgres or just SQLite),aria2c/wget2for parallel downloads,huggingface_hub.snapshot_downloadfor HF sets, torrent client for archive.org items, and URL lists from Step 2. Download top-N per source with backoff and resume (.aria2control files).Step 4 - Sanity + dedup (do this before tagging - it saves 50% of your costs)
imagehash(dHash/pHash) on sampled frames for near-dup GIFs; CLIP-embedding cosine similarity (> 0.95 = dup) for semantic near-dupes; ffprobe checks for corrupt/zero-frame/oversized files.Step 5 - Quality & "memeness" filter
nudenet); reject tiny/black-barred/watermarked-heavy files if you care; keep subreddit as a prior (r/HighQualityGifs β high quality).Step 6 - Transcode + poster frames (fixes the "blinking noise" complaint)
-c:v libvpx-vp9orlibx264, CRF tuned), generate a static JPEG/WebP poster frame per item, strip audio (GIFs have none, webm sources might).Step 7 - Describe & tag (the ML pass)
Step 8 - Embed + index in Chroma
Step 9 - Search service +
/gifUXGET /gif?q=β¦β hybrid search (vector + tag keyword + popularity boost), dedup results, return poster + webm URL + dimensions; a picker UI (modal, grid, keyboard navigation) for posts/comments; slash-command or button per Lensflare's original idea; click-to-play; "report bad result" feedback loop that adjusts popularity weights.Step 10 - Moderation, refresh & maintenance (the "every feature gets abused here" answer)
/gif; NSFW filter enforced at serving time (allow per-preference opt-in if you dare); upload path for user-contributed GIFs (goes through Steps 4-8 automatically); periodic refresh job (re-run Step 2 signals monthly, ingest new top-N, dedupe against DB); takedown/blocklist; disk monitoring.Bottom line
If you want, I can write the actual ingestion skeleton (worker queue + dedup + Chroma indexing) as a gist next - say the word.