/ Модель

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

Размер весов
229 МБ
Лицензия
Своя лицензия
Базовая модель
Krea-2-Turbo
Библиотека
diffusers
Опубликована
3 авг 2026

krea2-anypaint

Преобразование изображенийИзображение, текст → изображение4 профессии

Krea 2 AnyPaint — функциональный адаптер от yijunwang2 для базовой модели Krea/Krea-2-Turbo.

7 996скачиваний за 30 дней36лайковвеса обновлены3 авг 2026

Бенчмарки

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

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

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

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

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

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

Модель предназначена для редактирования изображений по произвольной маске, включая inpainting, outpainting и комбинированные сценарии расширения холста и изменения содержимого.

Адаптер поддерживает маски произвольной формы, несколько раздельных областей редактирования, узкие и изогнутые участки, маски, пересекающие границу исходного изображения, а также сохранение немаскированных областей с помощью согласованных латентных ограничений. Он рассчитан на работу с фотографиями, иллюстрациями, 3D-рендерами, интерьерами, объектами и изображениями людей. В метаданных указаны image-to-image pipeline, библиотека Diffusers и LoRA; сведения о размере модели, поддерживаемых языках, максимальном контексте и отдельных модальностях не приведены.

Обычные импортеры LoRA и автоматически сгенерированный пример Diffusers несовместимы с этим функциональным адаптером: для использования требуются поставляемые автором файлы example.py, pipeline.py и anypaint.py либо соответствующая интеграция для ComfyUI. Модель распространяется по лицензии Krea 2 Community License; подробные условия доступны по указанной в README ссылке.

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

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

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

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

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

Открыть на Hugging Face

Krea 2 AnyPaint: Arbitrary-Mask Inpainting, Outpainting, and Image Editing

Krea 2 AnyPaint provides arbitrary-mask inpainting, outpainting, and image editing for Krea 2 Turbo. One runtime handles internal edits, canvas extension, disconnected regions, narrow structures, and mixed masks that cross the source boundary.

Interactive ZeroGPU Space | ComfyUI nodes | Krea 2 functional adapters collection

At a glance

Important: The Hugging Face auto-generated Diffusers snippet and ordinary LoRA importers are not compatible with this functional adapter. Use the included example.py, pipeline.py, and anypaint.py.

Capabilities

  • arbitrary-shape and freehand mask image editing;
  • same-canvas inpainting;
  • one-pass outpainting into a larger canvas;
  • multiple disconnected edit regions;
  • narrow, curved, and boundary-crossing masks;
  • combined inpainting and outpainting in one request;
  • preservation of unmasked regions through timestep-matched latent constraints.

White mask pixels are generated or edited. Black mask pixels are preserved. The helper also marks every pixel outside the placed source as generated, so the same input contract covers both inpainting and outpainting.

Showcase

All showcase sources are synthetic, generated from the unmodified Krea 2 base model with original prompts. They contain no real-person identity, brand, existing fictional character, or other third-party character IP. Each listed result is the first output from its recorded prompt and fixed seed; unsuccessful runs were not silently removed.

The release candidate includes a diverse fixed-seed set covering photographic, illustrated, 3D, indoor, outdoor, object, and human-subject compositions. Every case ships with its source, exact binary mask, output, and generation metadata under showcase/.

AnyPaint showcase covering inpainting, outpainting, and arbitrary-mask image editing

01_photo_internal - Photographic internal edit

SourceGenerated maskAnyPaint result

Prompt: a sunlit modern kitchen interior with a handmade ceramic bowl of fresh lemons on the center island, coherent morning light, complete architectural photograph

02_watercolor_outpaint - Watercolor downward outpainting

SourceGenerated maskAnyPaint result

Prompt: an original watercolor greenhouse and coastal garden, the path and flowering plants continuing naturally downward, airy washes, complete vertical composition

03_3d_outpaint - Stylized 3D horizontal outpainting

SourceGenerated maskAnyPaint result

Prompt: an original retro-futuristic exploration rover crossing a colorful alien desert, distant mineral formations extending to the right, stylized 3D cinematic render

04_portrait_mixed - Original-character mixed edit

SourceGenerated maskAnyPaint result

Prompt: an original adult woman with short silver hair wearing a richly textured coral coat in a spacious contemporary gallery, complete full-body fashion photograph

05_botanical_disconnected - Disconnected honeybee insertion

SourceGenerated maskAnyPaint result

Prompt: an original botanical field illustration of blue and white meadow flowers with three small honeybees hovering naturally between the blossoms, delicate wings, fine paper texture, naturalistic painted details

07_product_narrow - Narrow cable recolor

SourceGenerated maskAnyPaint result

Prompt: an original sculptural brushed aluminum desk lamp with a vivid orange braided power cable extending from the lamp across the tabletop, premium neutral product photography

08_landscape_complex - Complex semantic landscape edit

SourceGenerated maskAnyPaint result

Prompt: an original alpine valley after rain with clusters of luminous rainbow-colored fantasy mushrooms growing along the winding riverbanks and foreground rocks, subtle magical glow reflected in wet stone, coherent wide cinematic landscape photograph

09_male_accessories - Male portrait accessories

SourceGenerated maskAnyPaint result

Prompt: a realistic editorial portrait of an adult man with short dark hair wearing thin rectangular silver eyeglasses and a small silver ear cuff, plain navy shirt, coherent soft daylight and neutral studio background

10_female_accessories - Female disconnected accessories

SourceGenerated maskAnyPaint result

Prompt: a polished portrait of an adult woman with shoulder-length auburn hair, a dark green enamel hair clip above her left ear and matching small geometric earrings, simple cream blouse, coherent natural daylight and pale gray studio background

11_product_restyle - Shoes and bag local redesign

SourceGenerated maskAnyPaint result

Prompt: an overhead catalog photograph with a pair of deep forest-green suede sneakers on the left and a cobalt-blue structured leather shoulder bag on the right, refined minimal hardware, balanced composition, coherent soft studio shadows

12_desk_objects - Two desktop object insertions

SourceGenerated maskAnyPaint result

Prompt: a clean oak writing desk in a softly lit home office with a handmade dark green ceramic mug on the left side and a small potted succulent in a matte white planter on the right, coherent restrained contemporary interior photograph

13_living_room_objects - Living-room multi-region insertion

SourceGenerated maskAnyPaint result

Prompt: a bright neutral living room with a tall brushed-brass floor lamp beside the left end of the cream sofa and a round woven storage basket beside the right end, simple coffee table, coherent warm daylight and understated architectural photography

14_window_view - Complete window-view replacement

SourceGenerated maskAnyPaint result

Prompt: a quiet contemporary reading room whose large central picture window overlooks a snowy mountain lake beneath a clear pale-blue winter sky, armchair in the foreground, coherent daylight, reflections and realistic interior photography

15_person_boundary - Boundary completion of an adult man

SourceGenerated maskAnyPaint result

Prompt: a complete full-body photograph of an adult man wearing a charcoal field jacket, gray shirt, straight dark trousers and practical brown boots, standing naturally on a quiet railway platform in coherent soft cloudy daylight

Input contract

The runtime takes:

  • one RGB source image;
  • one binary mask, either source-sized or canvas-sized;
  • an output canvas whose dimensions are multiples of 16;
  • an optional source bounding box (x0, y0, x1, y1) in output pixels;
  • a prompt describing the complete desired output image.

The source bounding box must stay inside the canvas and preserve the source aspect ratio. A source-sized mask is resized and placed with the source. A canvas-sized mask is used directly. Areas outside the source box are always generated.

The complete masked canvas is encoded as one maximum-edge-384 reference whose rotary coordinates cover the full target canvas. A full-resolution known image and keep mask separately preserve reliable unmasked latent tokens after every flow step. A 32-pixel boundary band is deliberately left for the model to redraw and blend. The returned image is the raw decoded model output; there is no hidden post-generation source composite.

Recommended settings

SettingValue
Inference basekrea/Krea-2-Turbo
Steps8
Guidance scale0.0
LoRA scale1.0
Reference maximum edge384 px
Boundary redraw band32 px
Reference VLM encodingenabled
Reference K/V cacheenabled

The adapter was trained at rank/alpha 32/32 against Krea 2 Raw and is intended for distilled inference with Krea 2 Turbo.

Usage

pip install -r requirements.txt

python example.py \
  --source input.webp \
  --mask mask.png \
  --output result.webp \
  --width 1536 \
  --height 1024 \
  --bbox 0 0 1024 1024 \
  --prompt "a bright modern studio, complete coherent composition"

For pure inpainting, omit --bbox and use a source image matching the output canvas. For outpainting, provide the source location in the larger canvas. The mask may additionally select any internal areas to regenerate.

How it works

  1. The source is placed without changing its aspect ratio.
  2. The out-of-source canvas and the user mask are unioned into one generated region.
  3. Generated pixels in the semantic reference are replaced by the median color of known pixels; the complete reference is encoded at a 384-pixel maximum edge.
  4. The denoiser uses destination-relative reference coordinates and isolated reference K/V caching.
  5. After every flow step, reliable known tokens are restored at the next noise level while the mask boundary remains free for coherent blending.

Limitations

  • Large generated fractions may introduce unrelated subjects or structures.
  • Very thin mask features may be coarsened by VAE and patch tokenization.
  • Ambiguous prompts can change more context near the 32-pixel redraw band.
  • The model may reproduce semantic biases present in the Krea 2 base model.
  • The portable BF16 example favors reproducibility over the fastest hardware-specific quantized runtime.

Responsible use

Use reference images only when you have the subject's consent or another lawful basis to use them. Do not use this model for deceptive impersonation, fraud, harassment, non-consensual intimate imagery, biometric identification, or misleading political or media content.

Deployments must follow the Krea 2 Acceptable Use Policy, implement appropriate content moderation, and disclose AI-generated content where required.

License

The LoRA weights are a derivative of Krea 2 and are released under the Krea 2 Community License in LICENSE.pdf. Pipeline and helper code are distributed under Apache License 2.0 in PIPELINE_LICENSE. This is an unofficial community release and is not endorsed by Krea or Ostris. Training data is not included.

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

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

GPU в ailist

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

Нельзя запустить

Модели «картинка → картинка» пока не запускаются: нужен ввод изображения для diffusion.

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

0 моделей