{"id":20497519,"url":"https://github.com/likhithsai2580/yt_thumbnail_creator","last_synced_at":"2025-08-19T21:28:07.992Z","repository":{"id":254120164,"uuid":"845417953","full_name":"Likhithsai2580/yt_thumbnail_creator","owner":"Likhithsai2580","description":"Creating Thumbnails for EveryOne, EveryWhere","archived":false,"fork":false,"pushed_at":"2025-01-11T18:46:24.000Z","size":22222,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T09:22:06.292Z","etag":null,"topics":["ai","ai-thumbnails","automation","thumbnail","youtube","yt-automation"],"latest_commit_sha":null,"homepage":"","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/Likhithsai2580.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":["Likhithsai2580"],"patreon":"anony45","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2024-08-21T08:00:30.000Z","updated_at":"2025-01-31T18:38:53.000Z","dependencies_parsed_at":"2024-08-25T03:26:52.396Z","dependency_job_id":"8e5cc4ec-99bf-4816-8df2-d8b437d3895c","html_url":"https://github.com/Likhithsai2580/yt_thumbnail_creator","commit_stats":null,"previous_names":["likhithsai2580/yt_thumbnail_creator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Likhithsai2580%2Fyt_thumbnail_creator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Likhithsai2580%2Fyt_thumbnail_creator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Likhithsai2580%2Fyt_thumbnail_creator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Likhithsai2580%2Fyt_thumbnail_creator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Likhithsai2580","download_url":"https://codeload.github.com/Likhithsai2580/yt_thumbnail_creator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248764374,"owners_count":21158074,"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":["ai","ai-thumbnails","automation","thumbnail","youtube","yt-automation"],"created_at":"2024-11-15T18:11:18.816Z","updated_at":"2025-04-13T18:41:00.114Z","avatar_url":"https://github.com/Likhithsai2580.png","language":"Python","funding_links":["https://github.com/sponsors/Likhithsai2580","https://patreon.com/anony45"],"categories":[],"sub_categories":[],"readme":"# YouTube Thumbnail Generator\n\nAn AI-powered YouTube thumbnail generator that leverages Stable Diffusion and Large Language Models (LLM) to create custom, eye-catching thumbnails based on a given topic.\n\n## Table of Contents\n\n- [Features](#features)\n- [Requirements](#requirements)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Detailed Function Descriptions](#detailed-function-descriptions)\n- [Customization](#customization)\n- [Logging](#logging)\n- [Troubleshooting](#troubleshooting)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- **Intelligent Thumbnail Ideation**: Utilizes LLM to generate creative thumbnail concepts and asset prompts.\n- **High-Quality Asset Generation**: Employs Stable Diffusion 3 to create visually appealing assets.\n- **Automated Thumbnail Assembly**: Combines generated assets into cohesive thumbnails.\n- **Background Removal**: Supports automatic background removal from assets for cleaner integration.\n- **Text Overlay**: Adds customizable text to thumbnails for increased engagement.\n- **Image Optimization**: Ensures output images are optimized for YouTube's requirements.\n\n## Requirements\n\n- Python 3.7+\n- gradio_client\n- Pillow\n- rembg\n- colorama\n- Custom LLM implementation (llm/llama.py)\n\n## Installation\n\n1. Clone this repository:\n   ```\n   git clone https://github.com/Likhithsai2580/yt_thumbnail_creator.git\n   cd yt_thumbnail_creator\n   ```\n\n2. Install the required packages:\n   ```\n   pip install gradio_client Pillow rembg colorama\n   ```\n\n3. Set up the custom LLM implementation:\n   - Ensure you have the `llm/llama.py` file in your project directory.\n   - Follow any additional setup instructions for your specific LLM implementation.\n\n4. Configure environment variables:\n   - Set `ASSET_DIR_PATH` to specify where generated assets should be stored.\n   - (Optional) Set any API keys or credentials required for Stable Diffusion or your LLM.\n\n## Usage\n\n1. Run the script:\n   ```\n   python yt_thumb_gen.py --topic \"Your Topic\"\n   ```\n2. The generated thumbnail will be saved to the path specified in `THUMBNAIL_PATH`.\n\n## Configuration\n\nModify the following variables in the script to customize the thumbnail generation:\n\n- `THUMBNAIL_PATH`: Path where the final thumbnail will be saved.\n- `FONT_SIZE`: Default font size for text on thumbnails.\n- `ASSET_DIR_PATH`: Directory to store generated assets.\n- `THUMBNAIL_SIZE`: Size of the generated thumbnail (default: 1280x720).\n\n## Detailed Function Descriptions\n\n### `generate_image(prompt, name, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps, api_name)`\nGenerates an image using the most efficient way and saves it as a PNG file.\n\n### `generate_asset(prompt, name, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps)`\nGenerates an asset using the most efficient way and saves it as a PNG file.\n\n### `extract_code(response)`\nExtracts Python code from LLM responses for further processing.\n\n### `generate_assets(topic)`\nGenerates all necessary assets for a thumbnail based on the given topic.\n\n### `add_to_thumbnail(thumbnail, asset_path, x, y)`\nAdds an asset to the thumbnail at the specified (x, y) coordinates.\n\n### `add_text_to_thumbnail(thumbnail, text, position, font_size, color)`\nAdds text to the thumbnail with customizable position, font size, and color.\n\n### `save_thumbnail(thumbnail)`\nSaves the final thumbnail to the specified path.\n\n### `remove_bg_from_asset(asset_path)`\nRemoves the background from an asset using the rembg library.\n\n## Customization\n\nTo generate thumbnails for different topics:\n\n1. Open `yt_thumb_gen.py` in your preferred text editor.\n2. Locate the `__main__` section at the bottom of the script.\n3. Modify the `topic` variable with your desired thumbnail topic.\n4. Save the file and run the script as described in the [Usage](#usage) section.\n\n## Logging\n\nThe script uses colorized logging via the `colorama` library to provide clear feedback on the thumbnail generation process. Different colors are used to highlight various stages and potential issues:\n\n- Green: Successful operations\n- Yellow: Warnings or important information\n- Red: Errors or critical issues\n- Blue: Processing steps\n\n## Troubleshooting\n\n- **Asset Generation Fails**: Ensure you have proper API credentials for Stable Diffusion and that your internet connection is stable.\n- **LLM Errors**: Check that your custom LLM implementation is correctly set up and that any required models are properly loaded.\n- **File Permission Issues**: Verify that the script has write permissions for the `ASSET_DIR_PATH` and `THUMBNAIL_PATH` directories.\n- **Missing Dependencies**: Run `pip install -r requirements.txt` to ensure all required packages are installed.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgements\n\n- [Stable Diffusion](https://stability.ai/) for providing the image generation capabilities.\n- The developers of [rembg](https://github.com/danielgatis/rembg) for the background removal functionality.\n- All contributors who have helped shape and improve this project.\n\n---\n\nFor any questions or support, please open an issue on the GitHub repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikhithsai2580%2Fyt_thumbnail_creator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flikhithsai2580%2Fyt_thumbnail_creator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flikhithsai2580%2Fyt_thumbnail_creator/lists"}