MCPcopy Index your code
hub / github.com/WUyinwei-hah/IFAdapter

github.com/WUyinwei-hah/IFAdapter @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
99 symbols 331 edges 9 files 14 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

IFAdapter: Instance Feature Control for Grounded Text-to-Image Generation

Yinwei Wu1,2 Xianpan Zhou1 Bing Ma1 Xuefeng Su1 Kai Ma1 Xinchao Wang2

<sup>1</sup>Tencent PGC&emsp;
<sup>2</sup>National University of Singapore&emsp;
<sup>&dagger;</sup>corresponding author

Overview

overall_structure

We introduce the Instance Feature Adapter(IFAdapter) to to exert fine-grained control over the generation of multiple instances.

Features

The IFAdapter is readily integrated with various community models and LoRAs! loras We show the results of IFAdapter in combination with PixelArt, Lelo-Lego, Claymation, and Bluepencil. We express our gratitude for these great work contributed by these communities!

Quick Start

Install the required dependencies

git clone https://github.com/WUyinwei-hah/IFAdapter.git

cd IFAdapter

pip install -r requirements.txt

Generation

1. Use the original SDXL for generation

python3 infer.py

2. Use LORAs for generation

python3 infer_loras.py

Citation

@article{wu2024ifadapter,
  title={Ifadapter: Instance feature control for grounded text-to-image generation},
  author={Wu, Yinwei and Zhou, Xianpan and Ma, Bing and Su, Xuefeng and Ma, Kai and Wang, Xinchao},
  journal={arXiv preprint arXiv:2409.08240},
  year={2024}
}

Core symbols most depended-on inside this repo

create_dataloader
called by 3
ifa_dataset.py
reshape_tensor
called by 3
if_adapter/resampler.py
generate
called by 2
if_adapter/if_adapter.py
exists
called by 2
if_adapter/attention_processor.py
_get_add_time_ids
called by 2
if_adapter/sdxl_pipeline.py
to_valid
called by 1
ifa_dataset.py
center_crop_arr
called by 1
ifa_dataset.py
encode_phrases
called by 1
infer.py

Shape

Method 59
Function 24
Class 16

Languages

Python100%

Modules by API surface

if_adapter/resampler.py29 symbols
if_adapter/sdxl_pipeline.py22 symbols
if_adapter/attention_processor.py22 symbols
ifa_dataset.py12 symbols
if_adapter/if_adapter.py6 symbols
infer_loras.py4 symbols
infer.py4 symbols

For agents

$ claude mcp add IFAdapter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page