Note about ComfyUI_stable_fast
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
From cc7531d1eb4c9042e614f24857df8b764c0c4ea6 Mon Sep 17 00:00:00 2001
|
||||
From: asagi4 <130366179+asagi4@users.noreply.github.com>
|
||||
Date: Mon, 14 Aug 2023 21:51:39 +0300
|
||||
Subject: [PATCH] Limit batch chunk size to 2
|
||||
|
||||
This makes AITemplate more reliable
|
||||
---
|
||||
comfy/samplers.py | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/comfy/samplers.py b/comfy/samplers.py
|
||||
index 28cd466..c92bbdc 100644
|
||||
--- a/comfy/samplers.py
|
||||
+++ b/comfy/samplers.py
|
||||
@@ -206,13 +206,7 @@ def sampling_function(model_function, x, timestep, uncond, cond, cond_scale, con
|
||||
to_batch_temp += [x]
|
||||
|
||||
to_batch_temp.reverse()
|
||||
- to_batch = to_batch_temp[:1]
|
||||
-
|
||||
- for i in range(1, len(to_batch_temp) + 1):
|
||||
- batch_amount = to_batch_temp[:len(to_batch_temp)//i]
|
||||
- if (len(batch_amount) * first_shape[0] * first_shape[2] * first_shape[3] < max_total_area):
|
||||
- to_batch = batch_amount
|
||||
- break
|
||||
+ to_batch = to_batch_temp[:2]
|
||||
|
||||
input_x = []
|
||||
mult = []
|
||||
--
|
||||
2.39.3
|
||||
|
||||
@@ -114,19 +114,19 @@ Similarly, you can use `AREA(x1 x2, y1 y2, weight)` to specify an area for the p
|
||||
Masking does not affect LoRA scheduling unless you set unet weights to 0 for a LoRA.
|
||||
|
||||
## Schedulable LoRAs
|
||||
The `ScheduleToModel` node patches a model such that when sampling, it'll switch LoRAs between steps. You can apply the LoRA's effect separately to CLIP conditioning and the unet (model)
|
||||
The `ScheduleToModel` node patches a model such that when sampling, it'll switch LoRAs between steps. You can apply the LoRA's effect separately to CLIP conditioning and the unet (model).
|
||||
|
||||
For me this seems to be quite slow without the --highvram switch because ComfyUI will shuffle things between the CPU and GPU. YMMV. When things stay on the GPU, it's quite fast.
|
||||
|
||||
## AITemplate support
|
||||
Note: The old AITemplate project is unmaintaned. I have a fork at https://github.com/asagi4/AIT that I'll keep on minimal life support until I can fix https://github.com/asagi4/comfyui-prompt-control/issues/15
|
||||
Note: Instead of AITemplate, try using [ComfyUI_stable_fast](https://github.com/gameltb/ComfyUI_stable_fast). It seems to work correctly when applied *before* `ScheduleToModel`.
|
||||
|
||||
The old AITemplate project is unmaintaned. I have a fork at https://github.com/asagi4/AIT that I'll keep on minimal life support until I can fix https://github.com/asagi4/comfyui-prompt-control/issues/15
|
||||
|
||||
LoRA scheduling supports AITemplate.
|
||||
|
||||
Due to sampler patching, your AITemplate nodes must be cloned to a directory called `AIT` under `custom_nodes` or the hijack won't find it.
|
||||
|
||||
AITemplate sometimes breaks because ComfyUI creates batches larger than what AITemplate can handle. You can apply [this patch](0001-Limit-batch-chunk-size-to-2.patch) to ComfyUI to make AITemplate more reliable. The patch is a hack though, and may slightly deoptimize non-AIT sampling
|
||||
|
||||
## Advanced CLIP encoding
|
||||
You can use the syntax `STYLE(weight_interpretation, normalization)` in a prompt to affect how prompts are interpreted.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user