twanghcmut's picture
|
download
raw
2.05 kB

Inference WebUI

DiffSynth-Studio provides an Inference WebUI to help developers quickly validate model performance.

The Inference WebUI is a debugging tool designed for developers, not a creation tool for end-users. For a richer feature set and more user-friendly interactive experience, we recommend using the AIGC Zone on ModelScope (for users in China) or the Civision Zone (for users outside China).

Launching the Inference WebUI

The Inference WebUI is built on Streamlit. We recommend installing DiffSynth-Studio in [all] mode:

git clone https://github.com/modelscope/DiffSynth-Studio.git
cd DiffSynth-Studio
pip install -e .[all]

Launch command:

streamlit run examples/dev_tools/webui.py --server.fileWatcherType none

How It Works

As a standalone tool, the Inference WebUI dynamically generates corresponding UI controls by parsing the type annotations of parameters in the Pipeline's from_pretrained and __call__ methods. Therefore, the interface interaction logic is fully consistent with the code invocation logic, serving as a visual entry point for DiffSynth-Studio code.

Taking ZImagePipeline.__call__ in diffsynth.pipelines.z_image as an example:

@torch.no_grad()
def __call__(
    self,
    # Prompt
    prompt: str = "",
    negative_prompt: str = "",
    cfg_scale: float = 1.0,
    # Image
    input_image: Image.Image = None,
    denoising_strength: float = 1.0,
    ...
)

After parsing, the WebUI will automatically render the following interface:

Usage Tips

  • Supports automatic loading of model information such as model_id and origin_file_pattern from sample code in ./examples, simplifying the configuration process;
  • Parameters such as vram_limit, tokenizer_config, and lora cannot be retrieved through code parsing and need to be filled in manually.

Xet Storage Details

Size:
2.05 kB
·
Xet hash:
4e2b7d3874bb3f95dba31b248e53c3b0c30c0de8a30b7d7355ee03961cf93dc7

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.