File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
examples/research_projects/anytext Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 8181EXAMPLE_DOC_STRING = """
8282 Examples:
8383 ```py
84+ >>> import torch
8485 >>> from diffusers import DiffusionPipeline
8586 >>> from anytext_controlnet import AnyTextControlNetModel
8687 >>> from diffusers import DDIMScheduler
8788 >>> from diffusers.utils import load_image
88- >>> import torch
89+
90+ >>> # I chose a font file shared by an HF staff:
91+ >>> !wget https://huggingface.co/spaces/ysharma/TranslateQuotesInImageForwards/resolve/main/arial-unicode-ms.ttf
8992
9093 >>> # load control net and stable diffusion v1-5
9194 >>> anytext_controlnet = AnyTextControlNetModel.from_pretrained("tolgacangoz/anytext-controlnet", torch_dtype=torch.float16,
9295 ... variant="fp16",)
93- >>> pipe = DiffusionPipeline.from_pretrained("tolgacangoz/anytext", font_path="Arial_Unicode2 .ttf",
96+ >>> pipe = DiffusionPipeline.from_pretrained("tolgacangoz/anytext", font_path="arial-unicode-ms .ttf",
9497 ... controlnet=anytext_controlnet, torch_dtype=torch.float16,
9598 ... trust_remote_code=True,
9699 ... ).to("cuda")
You can’t perform that action at this time.
0 commit comments