Skip to content

Conversation

@cvpcs
Copy link
Contributor

@cvpcs cvpcs commented Feb 11, 2026

Description

Adds support for sd_embed-style prompt embedding for the models supported by it. This is the style portrayed in the diffusers weighted prompting doc, so I thought it would be good to support.

Feature is locked behind an environment variable (SD_EMBED=1) similar to compel-style prompt embedding (COMPEL=1).

Notes for Reviewers

I tested by building cuda13-diffusers locally and running some sd_embed-style prompts to verify it ran and honored the weights provided. I only currently have validated SDXL models.

Signed commits

  • Yes, I signed my commits.

Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
@netlify
Copy link

netlify bot commented Feb 11, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 80ca06d
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/698caf3f68256000081a67c0
😎 Deploy Preview https://deploy-preview-8504--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
Copy link
Owner

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable here, and keeps backward compatibility


_ONE_DAY_IN_SECONDS = 60 * 60 * 24
COMPEL = os.environ.get("COMPEL", "0") == "1"
SD_EMBED = os.environ.get("SD_EMBED", "0") == "1"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only minor nit, but that we could probably follow-up, is that we are trying to move away from passing options to backends via env, and we are prefering via options instead.

This is mainly because it's otherwise difficult to fine-grain control envs across different models/backends.

@mudler mudler merged commit cff9720 into mudler:master Feb 11, 2026
41 of 45 checks passed
@mudler mudler added the enhancement New feature or request label Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants