{"id":13401814,"url":"https://github.com/saharmor/dalle-playground","last_synced_at":"2025-05-14T23:06:28.747Z","repository":{"id":37159441,"uuid":"405929837","full_name":"saharmor/dalle-playground","owner":"saharmor","description":"A playground to generate images from any text prompt using Stable Diffusion (past: using DALL-E Mini)","archived":false,"fork":false,"pushed_at":"2024-06-03T22:19:37.000Z","size":3161,"stargazers_count":2765,"open_issues_count":51,"forks_count":597,"subscribers_count":31,"default_branch":"main","last_synced_at":"2025-05-08T18:17:22.081Z","etag":null,"topics":["artificial","artificial-intelligence","dall-e","dalle","dalle-mini","gan","machine-learning","openai","stable-diffusion","text-to-image","transformers"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/saharmor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"saharmor"}},"created_at":"2021-09-13T10:35:50.000Z","updated_at":"2025-05-06T03:59:43.000Z","dependencies_parsed_at":"2023-12-29T07:29:08.291Z","dependency_job_id":"d98aa24e-c067-427a-9ea9-d624120498c7","html_url":"https://github.com/saharmor/dalle-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Fdalle-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Fdalle-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Fdalle-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saharmor%2Fdalle-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saharmor","download_url":"https://codeload.github.com/saharmor/dalle-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243360,"owners_count":22038046,"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","artificial-intelligence","dall-e","dalle","dalle-mini","gan","machine-learning","openai","stable-diffusion","text-to-image","transformers"],"created_at":"2024-07-30T19:01:07.474Z","updated_at":"2025-05-14T23:06:23.733Z","avatar_url":"https://github.com/saharmor.png","language":"JavaScript","funding_links":["https://github.com/sponsors/saharmor"],"categories":["JavaScript","其他_机器视觉","👑Stable Diffusion","stable-diffusion","Image Generation \u0026 Editing","📦 Legacy \u0026 Inactive Projects"],"sub_categories":["网络服务_其他","JavaScript"],"readme":"\u003cp align=\"center\"\u003e\n\n\u003cimg src=\"https://user-images.githubusercontent.com/6180201/231755090-4e487da8-a9fa-4d9f-b6e3-4271f7db4ead.png\" width=\"120\" alt=\"Dali\"\u003e\n\u003ch2 align=\"center\"\u003eText-to-image Playground (fka DALL-E Playground)\u003c/h2\u003e\n\u003c/p\u003e\n\nA playground for text-to-image enthusiasts using [Stable Diffusion V2](https://stability.ai/blog/stable-diffusion-v2-release).\n\n*\u003ch3\u003eNovember 2022, major update\u003c/h3\u003e*\nThe original version of this repository used [DALL-E Mini](https://github.com/borisdayma/dalle-mini). With the recent release of Stable Diffusion (SD) V2 and the ease of implementation - this repository has moved to use SD over DALL-E Mini.\n\n\u003cbr\u003e_Also see [Whisper Playground](https://github.com/saharmor/whisper-playground) - a playground for building real-time speech2text web apps using OpenAI's Whisper_\n\n\n![SD repo demo](https://user-images.githubusercontent.com/6180201/204181184-b257d832-d5f6-460d-8193-aaaf25214015.gif)\n\n## Fast usage\n\nYou can tinker with the DALL-E playground using a Github-hosted frontend. Follow these steps:\n\n1. Run the DALL-E backend using Google Colab [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/saharmor/dalle-playground/blob/main/backend/dalle_playground_backend.ipynb)\n2. Copy the URL from the output of the last executed cell. Search for the line stating with `Your url is:`.\n3. **Wait for the backend to fully load**, this should take ~2min and you should see `--\u003e Image generation server is up and running!`\n5. Browse https://saharmor.github.io/dalle-playground/?backendUrl=https://XXXX.trycloudflare.com where the `backendUrl` query parameter should be the url from the previous step\n\n**General note**: while it is possible to run the backend on the free tier of Google Colab, generating more than ~2 images would take \u003e1min, which will result in a frontend timeout. Consider upgrading to Colab Pro or run the backend notebook on your stronger ML machine (e.g. AWS EC2). \n\n\n## Local development\n\nFollow these steps in case you'd like to clone and run the DALL-E Playground locally:\n\n1. Clone or fork this repository\n2. Create a virtual environment `cd backend \u0026\u0026 python3 -m venv ENV_NAME`\n3. Run virtual environment `source venv/bin/activate`\n4. Install requirements `pip install -r requirements.txt`\n5. Make sure you have pytorch and its dependencies\n   installed _[Installation guide](https://pytorch.org/get-started/locally/)_\n6. Run web server `python3 app.py --port 8080` (you can change from 8080 to your own port)\n7. In a different terminal, install frontend's modules `cd interface \u0026\u0026 npm install` and run\n   it `npm start`\n8. Copy backend's url from step 5 and paste it in the backend's url input within the web app\n\n## Local development/use with Windows WSL2\n\nWindow's WSL2 Linux layer has some unique issues getting running with GPU support. Nvidia CUDA drivers are installed on the Windows side instead of Linux, but jax does not see the GPU without compiling from source. Here are extra instructions to get jax compiled.\n\n1. Have a recent NVIDIA GeForce Game Ready or NVIDIA RTX Quadro driver installed in Windows \n2. In Linux: Install Nvidia's CUDA toolkit, [WSL instructions](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#wsl-installation)\n3. In Linux: Install Nvidia's CuDNN library: [instructions](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html)\n4. In Linux: Build and install both `jaxlib` and `jax` from source, remember to enable cuda during compilation with `python3 build/build.py --enable_cuda` [instructions](https://jax.readthedocs.io/en/latest/developer.html)\n5. In compiling `jaxlib`, you might hit a broken configuration file, solution here: https://github.com/google/jax/issues/11068\n6. Follow local development instructions above\n\nWSL2 installs are fairly bare bones, expect to install packages like `npm`, `python3-pip` and many others to get things working. More troubleshooting [here](https://github.com/saharmor/dalle-playground/pull/44)\n\n## Local development with Docker-compose\n\n1. Make sure you have [docker](https://docs.docker.com/get-docker/) and [The NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html) installed \n2. Clone or fork this repository\n3. start server `docker-compose up`, add `-d` to `docker-compose up` if you'd like to run it in the background\n4. The first time will take some time to download the images, models and other dependencies. \n   models and other dependencies are downloaded only once, and then cached.\n4. Copy backend's url from step 2 and paste it in the backend's url input within the web app.\n   \n   webapp at `http://localhost:3000/dalle-playground`\n\n## Acknowledgements\nThe original reposistory used  @borisdayma's DALL-E Mini.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaharmor%2Fdalle-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaharmor%2Fdalle-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaharmor%2Fdalle-playground/lists"}