/ Модель

Характеристики

Базовая модель
stable-diffusion-xl-base-1.0
Опубликована
19 мая 2025

sdxl-longcliponly

Генерация изображенийТекст → изображение3 профессии

Экспериментальная модификация SDXL с LongCLIP для генерации изображений по более длинным текстовым запросам.

40скачиваний за 30 дней6лайковвеса обновлены23 мая 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Изображения» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели сгенерируют результат по каждой задаче. Опубликованный тест появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Экспериментальная версия Stable Diffusion XL Base 1.0 от opendiffusionai: в ней текстовый энкодер CLIP-L заменён на LongCLIP, а вклад CLIP-G обнулён. Модель генерирует изображения по текстовым запросам и рассчитана на работу с промптами длиной до 248 токенов без дополнительных приёмов расширения контекста.

Автор сообщает, что исходная комбинация работает без дообучения и показывает обнадёживающие результаты, однако качество заметно снижается на длинных запросах; для улучшения планировалось обучение. Для загрузки README рекомендует использовать формат Diffusers через загрузчик Hugging Face: работоспособность предоставленного файла safetensors не подтверждена, а некоторые программы несовместимы с лимитом CLIP-L в 248 токенов. Лицензия в предоставленных данных не указана.

Сценарии применения

  • генерация изображений по длинным описательным промптам
  • проверка влияния LongCLIP на генерацию изображений SDXL
  • создание сцен с объектами, упомянутыми в длинном запросе

Ограничения

Автор отмечает снижение качества на длинных запросах и необходимость дообучения; некоторые интерфейсы некорректно работают с контекстом CLIP-L длиной 248 токенов. Работа предоставленного файла safetensors не подтверждена.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

opendiffusionAI sdxl-longclip (RAW version V0.1)

BUGFIXES!!! (Latest update 2025/05/21)

Please note that the initial release had a bug in the tokenizer config.

tokenizer/tokenizer_config.json

needs to have "model_max_length": 248

Additionally.. I padded out tokenizer_2 and text_encoder_2 so that the normal python code works with this model now.

What is this?

This is the base SDXL model.. but the CLIP-L text encoder swapped out with "LongCLIP".... and then the values for CLIP-G zeroed so it has no effect.

In theory, it should be possible to replace the clip-g model with a dummy placeholder, so that the model takes 3G less VRAM overall. But my attempts at that failed.

Why is this?

SDXL's largest limitations are primarily due to the lousy CLIP(s) used. Not only are they of poor quality, but they have hidden token count limits, which make effective token count closer to 10. It is believed that one of the reasons CLIP-G was added on was to work around the limits of original CLIP-L. But.... that makes the model harder to train, and needlessly takes up more memory and time.

So, I created this version to experimentally prove the better way.

This allows use of up to 248 tokens with SDXL natively, without the layering hacks that some diffusion programs do.

Long Prompt demo

This prompt is stolen fromn the LongCLIP demo prompts:

The serene lake surface resembled a flawless mirror, reflecting the soft blue sky and the surrounding greenery. A gentle breeze played across its expanse, ruffling the surface into delicate ripples that gradually spread out, disappearing into the distance. Along the shore, weeping willows swayed gracefully in the light breeze, their long branches dipping into the water, creating a soothing sound as they gently brushed against the surface. In the midst of this serene scene, a pure white swan floated gracefully on the lake. Its elegant neck curved into a graceful arc, giving it an air of dignity.

The point here is that mention of a "swan" is beyond the 77 token limit. So if you see a swan, longclip is working.

swanlake

Quality Comparison:

I had originally expected a need to do finetuning after the modifications. I was pleasantly surprised, then, to see that the new raw model combination performs better than sdxl base, out of the box.

Sample image links:

(The face is more realistic, the clothes are better, and there is no duplication of the coffee cup on the table)

Known Problems

Needs training

This raw version of the model seems to work great with 3-5 word prompts... but then decays after that. So I'm working on a finetuned version.

Some programs blow up on it.

Some programs hardcode a CLIP-L token limit of "77". There isnt a valid reason to do this; it is possible to detect the actual token count limit.

This is extra unfortunate, since some programs do not merely disallow more tokens... they SEE that the new model supports 248 tokens, then complain, "hey! this model supports 248 tokens! I'm not going to allow you to use it."

Programs known to load the model

  • InvokeAI

  • SD.Next (a bit buggy at times, though)

safetensors file is not known to work (so use the huggingface loader!)

I did a blind conversion of the diffusers format to safetensors format using the OneTrainer conversion tools. However, it is not known to work. Even OT itself does not load it.

It is provided here in hope that someone so inclined, may use it as input to fix the problems with the relevant checkpoint loader.

Sample python code

The following works, as of 2025/05/21

import torch
from diffusers import StableDiffusionXLPipeline
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("-p", "--prompt", default="sad girl in snow")
parser.add_argument("-m", "--model", default="opendiffusionai/sdxl-longcliponly")

args = parser.parse_args()

pipe = StableDiffusionXLPipeline.from_pretrained(args.model)
device = torch.device("cuda")
pipe = pipe.to(device)

result = pipe(args.prompt, guidance_scale=7.5, num_inference_steps=30)

image = result.images[0]
image.save("testimg.png")

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Ревизия весов
1cdc8ed

0 моделей