Skip to content

Commit 75a0f1f

Browse files
committed
[Docs] Update README and pipeline_anytext.py to use AnyTextControlNetModel
1 parent d75508e commit 75a0f1f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

examples/research_projects/anytext/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ To learn about how to convert the fine-tuned stable diffusion model, see the [Lo
2020
```py
2121
import torch
2222
from pipeline_anytext import AnyTextPipeline
23-
from text_controlnet import TextControlNetModel
23+
from text_controlnet import AnyTextControlNetModel
2424
from diffusers import DDIMScheduler
2525
from diffusers.utils import load_image
2626

2727

28-
controlnet = TextControlNetModel.from_pretrained("tolgacangoz/anytext-controlnet", torch_dtype=torch.float16,
28+
controlnet = AnyTextControlNetModel.from_pretrained("tolgacangoz/anytext-controlnet", torch_dtype=torch.float16,
2929
variant="fp16")
3030
pipe = AnyTextPipeline.from_pretrained("tolgacangoz/anytext", controlnet=controlnet,
3131
torch_dtype=torch.float16, variant="fp16")

examples/research_projects/anytext/text_controlnet.py renamed to examples/research_projects/anytext/anytext_controlnet.py

File renamed without changes.

examples/research_projects/anytext/pipeline_anytext.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
Examples:
8181
```py
8282
>>> from pipeline_anytext import AnyTextPipeline
83-
>>> from text_controlnet import TextControlNetModel
83+
>>> from text_controlnet import AnyTextControlNetModel
8484
>>> from diffusers import DDIMScheduler
8585
>>> from diffusers.utils import load_image
8686
>>> import torch
8787
8888
>>> # load control net and stable diffusion v1-5
89-
>>> text_controlnet = TextControlNetModel.from_pretrained("tolgacangoz/anytext-controlnet", torch_dtype=torch.float16,
89+
>>> text_controlnet = AnyTextControlNetModel.from_pretrained("tolgacangoz/anytext-controlnet", torch_dtype=torch.float16,
9090
... variant="fp16",)
9191
>>> pipe = DiffusionPipeline.from_pretrained("tolgacangoz/anytext", controlnet=text_controlnet,
9292
... torch_dtype=torch.float16, variant="fp16",

0 commit comments

Comments
 (0)