{"id":15601072,"url":"https://github.com/lucidrains/tpdne","last_synced_at":"2025-08-21T20:32:17.879Z","repository":{"id":171686757,"uuid":"609595407","full_name":"lucidrains/TPDNE","owner":"lucidrains","description":"Thispersondoesnotexist went down, so this time, while building it back up, I am going to open source all of it.","archived":false,"fork":false,"pushed_at":"2023-08-26T18:07:39.000Z","size":36,"stargazers_count":87,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-11T02:20:33.282Z","etag":null,"topics":["artificial-intelligence","deep-learning","generative-adversarial-networks"],"latest_commit_sha":null,"homepage":"https://thispersondoesnotexist.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucidrains.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-04T16:49:55.000Z","updated_at":"2024-11-16T17:34:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"ff8240a3-c919-4cea-b43d-070ca18c4f8b","html_url":"https://github.com/lucidrains/TPDNE","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"458262eec15c8bf19d40b789999a8634fa134af1"},"previous_names":["lucidrains/tpdne"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2FTPDNE","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2FTPDNE/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2FTPDNE/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucidrains%2FTPDNE/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucidrains","download_url":"https://codeload.github.com/lucidrains/TPDNE/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230532443,"owners_count":18240792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","deep-learning","generative-adversarial-networks"],"created_at":"2024-10-03T02:13:45.727Z","updated_at":"2024-12-20T04:07:25.172Z","avatar_url":"https://github.com/lucidrains.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## TPDNE (wip)\n\n\u003ca href=\"https://twitter.com/kasiababis/status/1379370542986330112\"\u003eThispersondoesnotexist\u003c/a\u003e went down, so this time, while building it back up, I am going to open source all of it. I'll try to make it modular enough so anyone can deploy their own ever-dreaming GAN (or soon to be 1-2 step DDPM) to be public facing\n\nI may also take some time to do something I've always wanted. To \u003ca href=\"https://arxiv.org/abs/2305.01644\"\u003e'Perfuse'\u003c/a\u003e my dog into the machine and have it dream her up forever to the public.\n\n## Explained\n\nThe site is hosted on Hetzner on a 100$ / month GPU server. Images are generated live, so people, try as they might, cannot exhaust the amount of faces they experience. Through this, they gain an intuition for how vast the latent space of these neural networks are. It also allowed me to explain it to laypeople as having an 'artificial intelligence endlessly dreaming', without it having to be an exaggeration.\n\nHow was this feasible without scaling issues? Well, the site is actually a magic trick. Each user, when refreshing the page, actually sees the same image at any point in time. Images are replaced every 250ms, below the human reaction time. By the time the user studies the face and refreshes, the next face will be there, but it is the same face that everyone experiences around the world at the same time.\n\nThe model itself was trained by \u003ca href=\"https://research.nvidia.com/person/tero-karras\"\u003eTero Karras\u003c/a\u003e under the name \u003ca href=\"https://arxiv.org/abs/1912.04958\"\u003eStyleGAN 2\u003c/a\u003e.\n\n## Install\n\n```bash\n$ pip install TPDNE-utils\n```\n\n## Usage\n\n```python\nfrom TPDNE_utils import sample_image_and_save_repeatedly\n\n# some function that returns a sampled image in the form of a 3 dimensional ndarray\n\ndef generate_image():\n    import numpy as np\n    return np.random.randn(1024, 1024, 3)\n\n# saves a new sampled image every 250ms as out/sampled.jpeg\n\nsample_image_and_save_repeatedly(generate_image, 'out/sampled')\n\n# use nginx to serve out/sampled.jpeg\n# optionally put behind cloudflare\n```\n\n## Todo\n\n- [x] take care of an nginx template\n- [x] auto-handle various types of tensor outputs. auto-detect channel dimension and move it to last\n- [x] handle un-normalization of image tensors into 0-255 uint8 by autodetecting range\n- [ ] handle ssl in nginx\n\n## Citations\n\n```bibtex\n@inproceedings{Karras2020ada,\n    title     = {Training Generative Adversarial Networks with Limited Data},\n    author    = {Tero Karras and Miika Aittala and Janne Hellsten and Samuli Laine and Jaakko Lehtinen and Timo Aila},\n    booktitle = {Proc. NeurIPS},\n    year      = {2020}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucidrains%2Ftpdne","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucidrains%2Ftpdne","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucidrains%2Ftpdne/lists"}