{"id":40375424,"url":"https://github.com/yc015/scene-representation-diffusion-model","last_synced_at":"2026-01-20T11:34:55.482Z","repository":{"id":184591086,"uuid":"672163572","full_name":"yc015/scene-representation-diffusion-model","owner":"yc015","description":"Linear probe found representations of scene attributes in a text-to-image diffusion model","archived":false,"fork":false,"pushed_at":"2024-07-11T00:17:46.000Z","size":77247,"stargazers_count":36,"open_issues_count":0,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-05T13:53:09.351Z","etag":null,"topics":["explainability","image-editing","interpretability","scene","stable-diffusion"],"latest_commit_sha":null,"homepage":"https://yc015.github.io/scene-representation-diffusion-model/","language":"Jupyter Notebook","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/yc015.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"citation.bib","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-29T06:07:08.000Z","updated_at":"2025-02-06T17:10:08.000Z","dependencies_parsed_at":"2023-07-31T02:37:57.521Z","dependency_job_id":"36f3231f-11ef-4622-aeba-9e1f5f6b2ed7","html_url":"https://github.com/yc015/scene-representation-diffusion-model","commit_stats":null,"previous_names":["yc015/scene-representation-diffusion-model.github.io","yc015/scene-representation-diffusion-model"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yc015/scene-representation-diffusion-model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc015%2Fscene-representation-diffusion-model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc015%2Fscene-representation-diffusion-model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc015%2Fscene-representation-diffusion-model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc015%2Fscene-representation-diffusion-model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yc015","download_url":"https://codeload.github.com/yc015/scene-representation-diffusion-model/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yc015%2Fscene-representation-diffusion-model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28602487,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T10:46:13.255Z","status":"ssl_error","status_checked_at":"2026-01-20T10:42:51.865Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["explainability","image-editing","interpretability","scene","stable-diffusion"],"created_at":"2026-01-20T11:34:55.416Z","updated_at":"2026-01-20T11:34:55.477Z","avatar_url":"https://github.com/yc015.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Beyond Surface Statistics: Scene Representations in a Latent Diffusion Model\nLinear probes found controllable representations of scene attributes in a text-to-image diffusion model\n\nProject page of \"Beyond Surface Statistics: Scene Representations in a Latent Diffusion Model\"  \nPaper arXiv link: [https://arxiv.org/abs/2306.05720](https://arxiv.org/abs/2306.05720)  \n[[NeurIPS link]](https://nips.cc/virtual/2023/74894)  [[Poster link]](https://nips.cc/media/PosterPDFs/NeurIPS%202023/74894.png?t=1701540884.728899)  \n\n\n## How to generate a short video of moving foreground object using a pretrained text-to-image generative model?\nSee [application_of_intervention.ipynb](https://github.com/yc015/scene-representation-diffusion-model/blob/main/application_of_intervention.ipynb) for how to use our intervention technique to generate a short video of moving objects.\n\n### Some examples:\n\n\u003cdiv style=\"display:flex; flex-wrap:wrap; padding: 0; margin: 0;\"\u003e\n  \u003cimg src=\"https://github.com/yc015/scene-representation-diffusion-model/blob/main/resources/southern_container_plants.gif\" width=\"300px\" padding=\"0\" margin=\"0\"/\u003e\n  \u003cimg src=\"https://github.com/yc015/scene-representation-diffusion-model/blob/main/resources/macy_handbag.gif\" width=\"300px\" padding=\"0\" margin=\"0\"/\u003e\n\u003c/div\u003e\n\nThe gifs are sampled using the original text-to-image diffusion model without fine-tuning. All frames are generated using the **same prompt, random seed (inital latent vectors), and model**. We edited the intermediate activations of the latent diffusion model when it generated the images so its internal representtaion of foreground match with our reference mask. See [notebook](https://github.com/yc015/scene-representation-diffusion-model/blob/main/application_of_intervention.ipynb) for implementation details.\n\n![](https://github.com/yc015/scene-representation-diffusion-model.github.io/blob/main/resources/application_of_intervention.png)\n\n\n## Probe Weights:\nUnzip the [probe_checkpoints.zip](https://github.com/yc015/scene-representation-diffusion-model/blob/main/probe_checkpoints.zip) to acquire all probe weights trained by us. The probe weights in the unzipped folder should be sufficient for you to run all experiments shown in the paper. \n\n\n## Citation\nIf you find the source code of this repo helpful, please cite  \n\n    @article{chen2023beyond,\n      title={Beyond Surface Statistics: Scene Representations in a Latent Diffusion Model},\n      author={Chen, Yida and Vi{\\'e}gas, Fernanda and Wattenberg, Martin},\n      journal={arXiv preprint arXiv:2306.05720},\n      year={2023}\n    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyc015%2Fscene-representation-diffusion-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyc015%2Fscene-representation-diffusion-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyc015%2Fscene-representation-diffusion-model/lists"}