mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-24 00:39:30 +08:00
Merge branch 'master' into sam3d_body
This commit is contained in:
commit
d5ee42ce0a
@ -364,7 +364,7 @@ For models compatible with Iluvatar Extension for PyTorch. Here's a step-by-step
|
|||||||
| Flag | Description |
|
| Flag | Description |
|
||||||
|------|-------------|
|
|------|-------------|
|
||||||
| `--enable-manager` | Enable ComfyUI-Manager |
|
| `--enable-manager` | Enable ComfyUI-Manager |
|
||||||
| `--enable-manager-legacy-ui` | Use the legacy manager UI instead of the new UI (requires `--enable-manager`) |
|
| `--enable-manager-legacy-ui` | Use the legacy manager UI instead of the new UI (implies `--enable-manager`) |
|
||||||
| `--disable-manager-ui` | Disable the manager UI and endpoints while keeping background features like security checks and scheduled installation completion (requires `--enable-manager`) |
|
| `--disable-manager-ui` | Disable the manager UI and endpoints while keeping background features like security checks and scheduled installation completion (requires `--enable-manager`) |
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -133,7 +133,7 @@ upcast.add_argument("--dont-upcast-attention", action="store_true", help="Disabl
|
|||||||
parser.add_argument("--enable-manager", action="store_true", help="Enable the ComfyUI-Manager feature.")
|
parser.add_argument("--enable-manager", action="store_true", help="Enable the ComfyUI-Manager feature.")
|
||||||
manager_group = parser.add_mutually_exclusive_group()
|
manager_group = parser.add_mutually_exclusive_group()
|
||||||
manager_group.add_argument("--disable-manager-ui", action="store_true", help="Disables only the ComfyUI-Manager UI and endpoints. Scheduled installations and similar background tasks will still operate.")
|
manager_group.add_argument("--disable-manager-ui", action="store_true", help="Disables only the ComfyUI-Manager UI and endpoints. Scheduled installations and similar background tasks will still operate.")
|
||||||
manager_group.add_argument("--enable-manager-legacy-ui", action="store_true", help="Enables the legacy UI of ComfyUI-Manager")
|
manager_group.add_argument("--enable-manager-legacy-ui", action="store_true", help="Enables the legacy UI of ComfyUI-Manager. Implies --enable-manager.")
|
||||||
|
|
||||||
|
|
||||||
vram_group = parser.add_mutually_exclusive_group()
|
vram_group = parser.add_mutually_exclusive_group()
|
||||||
@ -258,6 +258,10 @@ if args.disable_auto_launch:
|
|||||||
if args.force_fp16:
|
if args.force_fp16:
|
||||||
args.fp16_unet = True
|
args.fp16_unet = True
|
||||||
|
|
||||||
|
# '--enable-manager-legacy-ui' is meaningless unless the manager is enabled, so imply '--enable-manager'.
|
||||||
|
if args.enable_manager_legacy_ui:
|
||||||
|
args.enable_manager = True
|
||||||
|
|
||||||
|
|
||||||
# '--fast' is not provided, use an empty set
|
# '--fast' is not provided, use an empty set
|
||||||
if args.fast is None:
|
if args.fast is None:
|
||||||
|
|||||||
9
comfy_api_nodes/apis/__init__.py
generated
9
comfy_api_nodes/apis/__init__.py
generated
@ -1310,13 +1310,6 @@ class KlingTaskStatus(str, Enum):
|
|||||||
failed = 'failed'
|
failed = 'failed'
|
||||||
|
|
||||||
|
|
||||||
class KlingTextToVideoModelName(str, Enum):
|
|
||||||
kling_v1 = 'kling-v1'
|
|
||||||
kling_v1_6 = 'kling-v1-6'
|
|
||||||
kling_v2_1_master = 'kling-v2-1-master'
|
|
||||||
kling_v2_5_turbo = 'kling-v2-5-turbo'
|
|
||||||
|
|
||||||
|
|
||||||
class KlingVideoGenAspectRatio(str, Enum):
|
class KlingVideoGenAspectRatio(str, Enum):
|
||||||
field_16_9 = '16:9'
|
field_16_9 = '16:9'
|
||||||
field_9_16 = '9:16'
|
field_9_16 = '9:16'
|
||||||
@ -5179,7 +5172,7 @@ class KlingText2VideoRequest(BaseModel):
|
|||||||
duration: Optional[KlingVideoGenDuration] = '5'
|
duration: Optional[KlingVideoGenDuration] = '5'
|
||||||
external_task_id: Optional[str] = Field(None, description='Customized Task ID')
|
external_task_id: Optional[str] = Field(None, description='Customized Task ID')
|
||||||
mode: Optional[KlingVideoGenMode] = 'std'
|
mode: Optional[KlingVideoGenMode] = 'std'
|
||||||
model_name: Optional[KlingTextToVideoModelName] = 'kling-v1'
|
model_name: Optional[str] = 'kling-v1'
|
||||||
negative_prompt: Optional[str] = Field(
|
negative_prompt: Optional[str] = Field(
|
||||||
None, description='Negative text prompt', max_length=2500
|
None, description='Negative text prompt', max_length=2500
|
||||||
)
|
)
|
||||||
|
|||||||
@ -436,7 +436,7 @@ async def execute_text2video(
|
|||||||
negative_prompt=negative_prompt if negative_prompt else None,
|
negative_prompt=negative_prompt if negative_prompt else None,
|
||||||
duration=KlingVideoGenDuration(duration),
|
duration=KlingVideoGenDuration(duration),
|
||||||
mode=KlingVideoGenMode(model_mode),
|
mode=KlingVideoGenMode(model_mode),
|
||||||
model_name=KlingVideoGenModelName(model_name),
|
model_name=model_name,
|
||||||
cfg_scale=cfg_scale,
|
cfg_scale=cfg_scale,
|
||||||
aspect_ratio=KlingVideoGenAspectRatio(aspect_ratio),
|
aspect_ratio=KlingVideoGenAspectRatio(aspect_ratio),
|
||||||
camera_control=camera_control,
|
camera_control=camera_control,
|
||||||
|
|||||||
@ -245,6 +245,11 @@ class KV_Attn_Input:
|
|||||||
cache_key = "{}_{}".format(extra_options["block_type"], extra_options["block_index"])
|
cache_key = "{}_{}".format(extra_options["block_type"], extra_options["block_index"])
|
||||||
if cache_key in self.cache:
|
if cache_key in self.cache:
|
||||||
kk, vv = self.cache[cache_key]
|
kk, vv = self.cache[cache_key]
|
||||||
|
|
||||||
|
# Fix batch size changing.
|
||||||
|
kk = comfy.utils.repeat_to_batch_size(kk, k.shape[0])
|
||||||
|
vv = comfy.utils.repeat_to_batch_size(vv, v.shape[0])
|
||||||
|
|
||||||
self.set_cache = False
|
self.set_cache = False
|
||||||
return {"q": q, "k": torch.cat((k, kk), dim=2), "v": torch.cat((v, vv), dim=2)}
|
return {"q": q, "k": torch.cat((k, kk), dim=2), "v": torch.cat((v, vv), dim=2)}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user