powwrpaint memory_save option

This commit is contained in:
nullquant
2024-05-31 18:19:00 +03:00
parent be7e884bae
commit 2b2eae37f9
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -209,7 +209,7 @@ You should try to add object description to negative prompt and describe empty s
- `CLIP`: PowerPaint CLIP that should be passed from PowerPaintCLIPLoader node.
- `fitting`: PowerPaint fitting degree.
- `function`: PowerPaint function, see its [page](https://github.com/open-mmlab/PowerPaint) for details.
- `save_memory`: If this option is set to `max`, the attention module splits the input tensor in slices to compute attention in several steps. This is useful for saving some memory in exchange for a decrease in speed.
- `save_memory`: If this option is set, the attention module splits the input tensor in slices to compute attention in several steps. This is useful for saving some memory in exchange for a decrease in speed. If you run out of VRAM or get `Error: total bytes of NDArray > 2**32` on Mac try to set this option to `max`.
When using certain network functions, the authors of PowerPaint recommend adding phrases to the prompt:
+3 -2
View File
@@ -189,7 +189,7 @@ class PowerPaint:
"scale": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 10.0}),
"start_at": ("INT", {"default": 0, "min": 0, "max": 10000}),
"end_at": ("INT", {"default": 10000, "min": 0, "max": 10000}),
"save_memory": (['auto', 'max'], ),
"save_memory": (['none', 'auto', 'max'], ),
},
}
@@ -292,7 +292,8 @@ class PowerPaint:
control_guidance_start = start_at
control_guidance_end = end_at
powerpaint['brushnet'].set_attention_slice(save_memory)
if save_memory != 'none':
powerpaint['brushnet'].set_attention_slice(save_memory)
add_brushnet_patch(model,
powerpaint['brushnet'],