Files
DiffSynth-Studio/docs/source_en/GetStarted/PromptProcessing.md
yrk111222 24b78148b8 Add files via upload
电脑更换,完成到D:\translate\DiffSynth-Studio\docs\source_en\finetune,该写第四个文档
2024-10-18 11:36:48 +08:00

1.8 KiB

Prompt Processing

DiffSynth includes prompt processing functionality, which is divided into:

  • Prompt Refiners (prompt_refiner_classes): Includes prompt refinement, prompt translation from Chinese to English, and both refinement and translation of prompts. Available parameters are as follows:

  • Prompt Extenders (prompt_extender_classes): Based on Omost's prompt partition control expansion. Available parameter is:

    • Prompt Partition Expansion: 'OmostPromter'.

Usage Instructions

Prompt Refiners

When loading the model pipeline, you can specify the desired prompt refiner functionality using the prompt_refiner_classes parameter. For example code, refer to sd_prompt_refining.py.

Available prompt_refiner_classes parameters include: Translator, BeautifulPrompt, QwenPrompt.

pipe = SDXLImagePipeline.from_model_manager(model_manager, prompt_refiner_classes=[Translator, BeautifulPrompt])

Prompt Extenders

When loading the model pipeline, you can specify the desired prompt extender using the prompt_extender_classes parameter. For example code, refer to omost_flux_text_to_image.py.

pipe = FluxImagePipeline.from_model_manager(model_manager, prompt_extender_classes=[OmostPromter])