{"id":23248494,"url":"https://github.com/FireRedTeam/LayerDiffuse-Flux","last_synced_at":"2025-12-30T00:07:02.397Z","repository":{"id":267604974,"uuid":"901735139","full_name":"RedAIGC/Flux-version-LayerDiffuse","owner":"RedAIGC","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-25T03:44:36.000Z","size":33483,"stargazers_count":148,"open_issues_count":8,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T16:03:07.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/RedAIGC.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}},"created_at":"2024-12-11T08:09:05.000Z","updated_at":"2025-03-28T07:37:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"74043814-ab59-4c3d-889c-8f18275a9abd","html_url":"https://github.com/RedAIGC/Flux-version-LayerDiffuse","commit_stats":null,"previous_names":["redaigc/flux-version-layerdiffuse"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedAIGC%2FFlux-version-LayerDiffuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedAIGC%2FFlux-version-LayerDiffuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedAIGC%2FFlux-version-LayerDiffuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RedAIGC%2FFlux-version-LayerDiffuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RedAIGC","download_url":"https://codeload.github.com/RedAIGC/Flux-version-LayerDiffuse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369953,"owners_count":20927928,"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":[],"created_at":"2024-12-19T08:14:02.192Z","updated_at":"2025-12-30T00:07:02.392Z","avatar_url":"https://github.com/RedAIGC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# LayerDiffuse-Flux\nThis repo is a Flux version implementation of LayerDiffuse ([LayerDiffuse](https://github.com/lllyasviel/LayerDiffuse)).\n\nWe train a **new transparent vae** to adapt to Flux and train a **lora** to finetune Flux to generate transparent images.\n\n|![](./imgs/top_examples/bottle_vis.png)|![](./imgs/top_examples/boat_vis.png)|![](./imgs/top_examples/cat_doctor_vis.png)|![](./imgs/top_examples/dragonball_vis.png)|![](./imgs/top_examples/dress_vis.png)|![](./imgs/top_examples/half_vis.png)|![](./imgs/top_examples/stickers_vis.png)|\n|:-:|:-:|:-:|:-:|:-:|:-:|:-:|\n## Installation\n\n+ Clone this repository.\n```shell\ngit clone https://github.com/RedAIGC/Flux-version-LayerDiffuse.git\ncd Flux-version-LayerDiffuse\nconda create -n flux_layer python=3.10 -y\nconda activate flux_layer\npip install torch==2.3.0 torchvision==0.18.0 --index-url https://download.pytorch.org/whl/cu121\npip install -r requirements.txt\n```\n+ download weights\n``` shell\nhuggingface-cli download --resume-download --local-dir ./models RedAIGC/Flux-version-LayerDiffuse \n```\n+ Make sure that you have the following directory structure.\n```\nFlux-version-LayerDiffuse/\n| - imgs\n| - lib_layerdiffuse\n| - models\n    | - layerlora.safetensors\n    | - TransparentVAE.pth\n| ...\n```\n\n## Flux Transparent T2I\n### demo\n```shell\npython demo_t2i.py --ckpt_path /your/path/to/FLUX.1_dev --prompt /your/prompt\n```\n### examples\n\n| Examples: top to bottom: flux, flux-layer(ours), sdxl, sdxl-layer([LayerDiffuse](https://github.com/lllyasviel/LayerDiffuse))        |\n|------------------------------------|\n|![](./imgs/flux_layer_t2i_examples/test0_10_vis.jpg)|\n|![](./imgs/flux_layer_t2i_examples/test10_20_vis.jpg)|\n|![](./imgs/flux_layer_t2i_examples/test20_30_vis.jpg)|\n|![](./imgs/flux_layer_t2i_examples/test30_40_vis.jpg)|\n|![](./imgs/flux_layer_t2i_examples/test40_50_vis.jpg)|\n\n\n\n## Flux Transparent I2I\n```shell\npython demo_i2i.py --ckpt_path /your/path/to/FLUX.1_dev --image \"./imgs/causal_cut.png\" --prompt /your/prompt\n```\nPrompt: \"a handsome man with curly hair, high quality\"\n\nStrength: 0.9\n\n| Input (Transparent image)          | Output (Transparent image)                 |\n|------------------------------------|--------------------------------------------|\n| ![img](imgs/causal_cut_vis.png)        | ![img](imgs/causal_cut_output_vis.png) | \n\n## Acknowledgements\nThanks lllyasviel for their great work [LayerDiffuse](https://github.com/lllyasviel/LayerDiffuse)\nYou can use style RGBA image to finetune the network to get better results.\n\n## Contact\nIf you have any questions about the code, please do not hesitate to contact us!\n\nEmail: sunshuang1@xiaohongshu.com, xiangqiang1601@163.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFireRedTeam%2FLayerDiffuse-Flux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFireRedTeam%2FLayerDiffuse-Flux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFireRedTeam%2FLayerDiffuse-Flux/lists"}