Reference Image Input
Референс для img2img и ControlNet. Pro · Изображения и генерация › Промпт и параметры
Установка
npx valyro-cli@latest login
npx valyro-cli@latest add reference-image-input
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { ReferenceImageInput } from 'valyro-ui-pro';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
value | ReferenceImage | null | Controlled value; use with onValueChange. | |
defaultValue | ReferenceImage | null | null | Initial value when uncontrolled. |
onValueChange | (image: ReferenceImage | null) => void | Called with the new value when it changes. | |
mode | 'img2img' | 'controlnet' | 'controlnet' | img2img shows denoising strength; controlnet shows a preprocessor with preview and a weight. |
preprocessor | 'none' | 'canny' | 'depth' | 'lineart' | 'softedge' | 'openpose' | Controlled preprocessor; use with onPreprocessorChange. | |
defaultPreprocessor | 'none' | 'canny' | 'depth' | 'lineart' | 'softedge' | 'openpose' | 'canny' | Initial preprocessor when uncontrolled. |
onPreprocessorChange | (preprocessor: Preprocessor) => void | Called with the new preprocessor when it changes. | |
preprocessors | readonly Preprocessor[] | ALL_PREPROCESSORS | Offered preprocessors. Default: all. |
strength | number | img2img denoising strength, 0–1. | |
defaultStrength | number | 0.6 | Initial strength when uncontrolled. |
onStrengthChange | (strength: number) => void | Called with the new strength when it changes. | |
weight | number | ControlNet weight, 0–2. | |
defaultWeight | number | 1 | Initial weight when uncontrolled. |
onWeightChange | (weight: number) => void | Called with the new weight when it changes. | |
accept | string | 'image/*' | File types for the picker, paste and drop. Default image/*. |
size | 'sm' | 'md' | 'md' | sm has a shorter drop zone and a smaller, muted title. |
disabled | boolean | false | Ignores picking, paste and drop, and disables Replace, Remove, the preprocessor and the sliders. |
locale | string | BCP 47 locale for numbers and dates; defaults to the ThemeProvider's, then the browser's. | |
labels | Partial<ReferenceImageInputLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Похожие компоненты
- Prompt Editor — Промпт и негатив: веса, LoRA, автодополнение, токены
- Generation Settings — Модель, сэмплер, шаги, CFG, размер, пресеты
- Aspect Ratio Picker — Соотношение сторон и точный размер
- Seed Input — Сид: случайный, фиксированный, инкремент
- LoRA Stack — Стек LoRA: силы, переключатели, порядок, триггеры
- Style Presets — Карточки стилей с превью и весами
- Generation Progress — Шаги, ETA, живое латентное превью, очередь
- Image Result Grid — Галерея результатов, действия и лайтбокс
- Image Compare — Сравнение до/после: шторка, рядом, наложение
- Inpaint Canvas — Маска для инпейнтинга и расширение холста
- Generation History — История генераций по дням с фильтрами
- Image Adjustments — Цветокоррекция: загрузка, вписывание и семь ползунков с фильтром
Назад: Style Presets · Далее: Generation Progress · Весь раздел «Изображения и генерация»