How to combine Inpaint and ContentRef templates?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- python
- Domain
- ai, machine-learning
Research direction
Start with the TemplatePipeline.from_pretrained entry point and the ModelConfig and template_inputs usage shown in the issue. Check whether Inpaint and ContentRef are supported together and what the completed input should be; done means a reproducible supported example or a clear limitation and error explanation.
Written by the indexing model from the issue text.
Description
Hi, thanks for this great project.
I am trying to use these two templates together:
DiffSynth-Studio/Template-KleinBase4B-InpaintDiffSynth-Studio/Template-KleinBase4B-ContentRef
My goal is:
- Use Inpaint to modify only the masked area.
- Use ContentRef to guide the generated content/style.
Both templates work individually, but I am not sure how to combine them correctly.
I tried loading both templates:
template = TemplatePipeline.from_pretrained(
torch_dtype=torch.bfloat16,
device="cuda",
model_configs=[
ModelConfig(model_id="DiffSynth-Studio/Template-KleinBase4B-Inpaint"),
ModelConfig(model_id="DiffSynth-Studio/Template-KleinBase4B-ContentRef"),
],
)
and passing both inputs:
template_inputs=[
{
"model_id": 0,
"image": image,
"mask": mask,
"force_inpaint": True,
},
{
"model_id": 1,
"image": reference_image,
},
]
But I got:
paste error or describe the unexpected result here
- Is combining Inpaint + ContentRef supported?
- Is this the correct way to pass multiple templates?
- Are there any additional settings required for ContentRef + Inpaint?
Thanks!
- Dominant language
- Python
- Stars
- 13.2k
- Forks
- 1.3k
- Avg merge
- 22h 15m
- Merged PRs (30d)
- 31
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelscope/DiffSynth-Studio
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelscope/DiffSynth-Studio#1707 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
modelscope/DiffSynth-Studio#1668 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
modelscope/DiffSynth-Studio#1499 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
modelscope/DiffSynth-Studio#1373 · 5 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
[Reproducibility] Training script / config for MiniMax-H3-TrainingAdapter (DeCFG adapter) itselfOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
modelscope/DiffSynth-Studio#1713 · 1 comment ·
Maintainers usually reply within 1 day
All issues in modelscope/DiffSynth-Studio
Similar issues
-
New InternshipOpennew_internship
Difficulty 1/5 Under an hour Newbie friendliness 70/100
-
[BUG] Reports tab: "Unban" button tooltip shows raw `{{ip}}` placeholder instead of the IP addressOpenbug javascript ui
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bunkerity/bunkerweb#4001 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
PedestrianDynamics/pyFDS-Evac#476 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/differential-privacy#516 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
adobe-fonts/source-serif#153 ·