Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

wbruna
Copy link
Contributor

@wbruna wbruna commented Aug 14, 2025

The CLIP weights need to be converted to f32 for textual inversions (fbd42b6, for #601), but that increases the amount of allocated VRAM even when embeddings aren't being used.

On a typical SDXL render on Vulkan, this change reduces peak VRAM usage around 190MB.

I'm including a refactor of the clip_skip handling, since this change would end up conflicting with it. Please let me know if I shall submit it separately instead.

All handlers are constructed with the default clip_skip value, and
it is always set during inference time, so there isn't much point
in keeping it as a persistent attribute. Instead, just propagate
the parameter value down from get_learned_condition*.
The CLIP weights need to be converted to f32 for textual inversions
(fbd42b6), but that increases the
amount of allocated VRAM even when embeddings aren't being used.
@wbruna wbruna force-pushed the clip_memory_usage_embeddings branch from 42f2fa6 to 489069c Compare September 13, 2025 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant