项目预览
项目数据
项目介绍
Star 增长趋势
本站每日记录该项目 GitHub 星标变化,观测越久曲线越完整
数据来源:GitHub API 逐日快照 · 收录于 2026-08-09 · 当前星标 ★ 810
使用教程
ℹ 本教程由 AI 依据该项目 README 整理,个别步骤可能需要按你的环境微调。
环境要求
- NVIDIA GPU 16G+ 显存
- Python 3.10
- SD 2.1 权重
安装与启动步骤
-
1建环境
扩散模型 + 自定义算子,独立环境最稳。
conda create -n tficon python=3.10 -y && conda activate tficon -
2装依赖
仓库支持 pip install -e 安装成包。
git clone https://github.com/Shilin-LU/TF-ICON.git cd TF-ICON && pip install -e . -
3下载权重
需要 Stable Diffusion 2.1 的 ema 权重,放到 ckpt 目录。
mkdir -p ckpt && mv v2-1_512-ema-pruned.ckpt ckpt/ -
4跑跨域合成
准备前景与背景两张图,跑 cross_domain 脚本。
python scripts/main_tf_icon.py --ckpt ckpt/v2-1_512-ema-pruned.ckpt --root ./inputs/cross_domain --outdir ./outputs
如何确认成功
outputs 目录生成合成图,前景边缘无生硬白边。
注意事项
- 论文方法是 training-free,所以不需要训练,只跑推理。
- 同域(same_domain)脚本换 --root ./inputs/same_domain 即可。
- 显存不足可以把分辨率降一档,效果损失可接受。
核心亮点
- 免训练设计,直接利用预训练 Stable Diffusion,部署成本低
- 支持跨域合成,能融合真实照片与艺术风格,效果自然
- 提供官方 ICCV 论文实现,代码结构清晰,易于复现
不足之处
- 依赖 Stable Diffusion 模型,生成速度受限于扩散采样步数
- 对输入图像的分辨率和内容复杂度敏感,复杂场景可能失真
适用场景
- 创意海报设计,将产品图与艺术背景融合
- 虚拟场景构建,合成不同风格的建筑或风景
- 艺术创作,将写实照片转化为特定画派风格
替代项目
Stable Diffusion img2img、ControlNet、Composable Diffusion
上一篇:Radiata
下一篇:aphantasia
同类项目推荐
stable-diffusion-docker
开源
一条命令跑起官方 Stable Diffusion,文生图、修图、放大全搞定
Run the official Stable Diffusion releases in a Docker container with txt2img, img2i···
WordStylist
开源
用扩散模型生成指定内容和风格的手写文字
Official PyTorch Implementation of "WordStylist: Styled Verbatim Handwritten Text Ge···
Energy-Based-CrossAttention
开源
用能量模型优化注意力,让文生图更懂上下文
The official repository of "Energy-Based Cross Attention for Bayesian Context Update···
Outfit-Anyone-in-the-Wild
开源
上传任意照片和服装,一键生成自然试穿效果,摆脱姿势和背景限制。
Outfit Anyone in the Wild: Get rid of Annoying Restrictions for Virtual Try-on Task
stable-diffusion-webui-sonar
开源
给Stable Diffusion WebUI加装采样优化器,提升出图质量
Wrapped k-diffuison samplers with tricks to improve the generated image quality (may···
ealain
开源
让每次锁屏都生成一幅独一无二的AI艺术画
Ealain is a macOS & Windows screensaver that displays abstract, bauhaus style art ge···
stable-diffusion-cpp-python
开源
在 Python 里直接跑 Stable Diffusion,轻量本地生成图像
stable-diffusion.cpp bindings for python
DiffusionToolkit
开源
把 AI 生成图按参数自动归档,想找哪张秒搜到
Metadata-indexer and Viewer for AI-generated images
VisualCloze
开源
一个框架搞定多种图像生成任务,还能举一反三
[ICCV 2025] VisualCloze: A universal image generation framework that can support a w···