diff --git a/app/frontend_management.py b/app/frontend_management.py index 7b7923b79..d9ef8c921 100644 --- a/app/frontend_management.py +++ b/app/frontend_management.py @@ -205,6 +205,19 @@ comfyui-workflow-templates is not installed. """.strip() ) + @classmethod + def embedded_docs_path(cls) -> str: + """Get the path to embedded documentation""" + try: + import comfyui_embedded_docs + + return str( + importlib.resources.files(comfyui_embedded_docs) / "docs" + ) + except ImportError: + logging.info("comfyui-embedded-docs package not found") + return None + @classmethod def parse_version_string(cls, value: str) -> tuple[str, str, str]: """ diff --git a/docs/FluxProUltraImageNode/assets/flux-1-1-pro-ultra-image.jpg b/docs/FluxProUltraImageNode/assets/flux-1-1-pro-ultra-image.jpg deleted file mode 100644 index 9ce0dc04f..000000000 Binary files a/docs/FluxProUltraImageNode/assets/flux-1-1-pro-ultra-image.jpg and /dev/null differ diff --git a/docs/FluxProUltraImageNode/en.md b/docs/FluxProUltraImageNode/en.md deleted file mode 100644 index e49d9ea21..000000000 --- a/docs/FluxProUltraImageNode/en.md +++ /dev/null @@ -1,40 +0,0 @@ -![ComfyUI Native Flux 1.1 [pro] Ultra Image node](assets/flux-1-1-pro-ultra-image.jpg) - -The Flux 1.1 [pro] Ultra Image node allows you to generate ultra-high-resolution images through text prompts, directly connecting to Black Forest Labs' latest image generation API. - -This node supports two main usage modes: -1. **Text-to-Image**: Generate high-quality images from text prompts (when no image input is used) -2. **Image-to-Image**: Combine existing images with prompts to create new images that blend features from both (Remix mode) - -This node supports Ultra mode through API calls, capable of generating images at 4 times the resolution of standard Flux 1.1 [pro] (up to 4MP), without sacrificing prompt adherence, and maintaining super-fast generation times of just 10 seconds. Compared to other high-resolution models, it's more than 2.5 times faster. - -## Parameter Description - -### Basic Parameters - -| Parameter | Type | Default | Description | -| ----------------- | ------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| prompt | String | "" | Text description for generating the image | -| prompt_upsampling | Boolean | False | Whether to use prompt upsampling technique to enhance details. When enabled, automatically modifies prompts for more creative generation, but results become non-deterministic (same seed won't produce exactly the same result) | -| seed | Integer | 0 | Random seed value, controls generation randomness | -| aspect_ratio | String | "16:9" | Width-to-height ratio of the image, must be between 1:4 and 4:1 | -| raw | Boolean | False | When set to True, generates less processed, more natural-looking images | - -### Optional Parameters - -| Parameter | Type | Default | Description | -| --------------------- | ----- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | -| image_prompt | Image | None | Optional input, used for Image-to-Image (Remix) mode | -| image_prompt_strength | Float | 0.1 | Active when `image_prompt` is input, adjusts the blend between prompt and image prompt. Higher values make output closer to input image, range is 0.0-1.0 | - -### Output - -| Output | Type | Description | -| ------ | ----- | -------------------------------------- | -| IMAGE | Image | Generated high-resolution image result | - -## How It Works - -Flux 1.1 [pro] Ultra mode uses optimized deep learning architecture and efficient GPU acceleration technology to achieve high-resolution image generation without sacrificing speed. When a request is sent to the API, the system parses the prompt, applies appropriate parameters, then computes the image in parallel, finally generating and returning the high-resolution result. - -Compared to regular models, Ultra mode particularly focuses on detail preservation and consistency at large scales, ensuring impressive quality even at 4MP high resolution. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 8f7a78984..823cba1e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ comfyui-frontend-package==1.19.9 comfyui-workflow-templates==0.1.14 +comfyui-embedded-docs==0.1.0 torch torchsde torchvision diff --git a/server.py b/server.py index de9e70a41..21cfa9195 100644 --- a/server.py +++ b/server.py @@ -746,11 +746,12 @@ class PromptServer(): web.static('/templates', workflow_templates_path) ]) - # Serve node documentation markdown from the docs directory - docs_dir = os.path.join(os.path.dirname(__file__), 'docs') - self.app.add_routes([ - web.static('/docs', docs_dir) - ]) + # Serve embedded documentation from the package + embedded_docs_path = FrontendManager.embedded_docs_path() + if embedded_docs_path: + self.app.add_routes([ + web.static('/docs', embedded_docs_path) + ]) self.app.add_routes([ web.static('/', self.web_root),