{"id":23529416,"url":"https://github.com/ahmadabbadi101/stable-diffusion","last_synced_at":"2026-05-17T17:02:57.262Z","repository":{"id":269366829,"uuid":"907190149","full_name":"ahmadabbadi101/Stable-Diffusion","owner":"ahmadabbadi101","description":"Probability-based analysis of Stable Diffusion Model. Scaling down the model into fairly simple practical tasks. Done as a university project with two colleagues.","archived":false,"fork":false,"pushed_at":"2025-01-15T05:41:28.000Z","size":5529,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T12:21:16.818Z","etag":null,"topics":["analysis","probabilistic-models","probability","probability-distribution","python","stable-diffusion"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmadabbadi101.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2024-12-23T03:19:28.000Z","updated_at":"2025-01-15T05:41:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"b20d0540-9097-4386-9c0b-3ef1e6164f33","html_url":"https://github.com/ahmadabbadi101/Stable-Diffusion","commit_stats":null,"previous_names":["ahmadabbadi101/stable-diffusion"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmadabbadi101/Stable-Diffusion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadabbadi101%2FStable-Diffusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadabbadi101%2FStable-Diffusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadabbadi101%2FStable-Diffusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadabbadi101%2FStable-Diffusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmadabbadi101","download_url":"https://codeload.github.com/ahmadabbadi101/Stable-Diffusion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmadabbadi101%2FStable-Diffusion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272793018,"owners_count":24993830,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["analysis","probabilistic-models","probability","probability-distribution","python","stable-diffusion"],"created_at":"2024-12-25T21:10:25.692Z","updated_at":"2026-05-17T17:02:52.240Z","avatar_url":"https://github.com/ahmadabbadi101.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stable Diffusion : Gaussian Noise - Color Distribution\n\nStable Diffusion is an artificial intelligence model that can generate images from\ndescriptive text inputs.\n\n## The Diffusion Process \nTo generate a unique desired image, the model starts with a random Gaussian Noise \nimage information, and from here undergoes multiple steps to reach our desired image.\nEach step the model changes the information in a way that more resembles the input\ntext but also in a way that resembles the visual information the model picked up from all\nimages it has been trained on.\n\n### Training Diffusion Models\nNoise Predictor: \nWe get an image, generate some random gaussian noise, and then let the model predict\nthis noise. After that the model compares its prediction to the actual noise (calculate\nloss), then updates itself to be better next time.\n\nReverse Diffusion (Denoising)\nThe trained noise predictor takes a noisy image, the amount of noise, and is able to\npredict some of the noise by each step. The noise is predicted so that if we subtract it\nfrom the noisy image we get an image close to the images the model has been trained\non, not the exact images but fits the distribution of those images. Though until now we\nhave no control over the generated images, here is where we incorporate the text input\nand generate what we want.\n\n## Generating an image that fits the data it trained on \nThis data has certain distributions for everything : colors, objects, mood, style, details,\nand much more. So what the model does is generate an image that belongs to these\ndistributions in the way needed.\nWe will now consider images of Van Gogh as our data, we will study their color\ndistributions namely Histograms. By doing that we will know how this artist uses color\nand what are the most likely colors used. A model like Stable Diffusion uses that\ninformation to generate new images that look like it's drawn by this artist.\n\n# What is this project\n It is focused from a probability aspect on two parts, Gaussian Noise and color distribuion.\n \n ### Gaussian Noise\n Adding random Gaussian noise to an image. How does variance and mean affect the noise.\n \u003e GaussianNoise.py : Takes an image,also mean and variance of the gaussian noise. Outputs noisy image and representing the gaussian distribution with its PMF and CDF.\n\n### Color Distribution\nGenerating color histogram for red, green, blue in pixels we get their frequencies or count. Normalizing this histogram we obtain the probabilty for each color intensity or PMF.\n\u003e colorDistribution.py : Takes an image, outputs PMF and CDF of the each color channel.\n\n\u003e conditionalProbability.py : Generates a joint histogram between two color channels to see dependant probabilities of a color given that the other color has acertain intensity.\n\n## Documentation\nFor more details and results please visit the [documentation](https://github.com/ahmadabbadi101/Stable-Diffusion/blob/main/Stable%20Diffusion.pdf).\n\n## Contributors\n\n\u003e [Shahd El-Refai](github.com/shahdelrefai)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadabbadi101%2Fstable-diffusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmadabbadi101%2Fstable-diffusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmadabbadi101%2Fstable-diffusion/lists"}