mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore(ui): lint
This commit is contained in:
parent
ea267c0e09
commit
434afdd21d
@ -83,7 +83,13 @@ const handleMainModels: ModelHandler = (models, state, dispatch, log) => {
|
||||
dispatch(modelChanged({ model: defaultModelInList, previousModel: currentModel }));
|
||||
|
||||
const optimalDimension = getOptimalDimension(defaultModelInList);
|
||||
if (getIsSizeOptimal(state.canvasV2.present.bbox.rect.width, state.canvasV2.present.bbox.rect.height, optimalDimension)) {
|
||||
if (
|
||||
getIsSizeOptimal(
|
||||
state.canvasV2.present.bbox.rect.width,
|
||||
state.canvasV2.present.bbox.rect.height,
|
||||
optimalDimension
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const { width, height } = calculateNewSize(
|
||||
|
@ -11,7 +11,9 @@ const selectEntityIds = createMemoizedSelector(selectCanvasV2Slice, (canvasV2) =
|
||||
});
|
||||
|
||||
export const ControlLayerEntityList = memo(() => {
|
||||
const isSelected = useAppSelector((s) => Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'control_layer'));
|
||||
const isSelected = useAppSelector((s) =>
|
||||
Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'control_layer')
|
||||
);
|
||||
const layerIds = useAppSelector(selectEntityIds);
|
||||
|
||||
if (layerIds.length === 0) {
|
||||
|
@ -11,7 +11,9 @@ const selectEntityIds = createMemoizedSelector(selectCanvasV2Slice, (canvasV2) =
|
||||
});
|
||||
|
||||
export const InpaintMaskList = memo(() => {
|
||||
const isSelected = useAppSelector((s) => Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'inpaint_mask'));
|
||||
const isSelected = useAppSelector((s) =>
|
||||
Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'inpaint_mask')
|
||||
);
|
||||
const entityIds = useAppSelector(selectEntityIds);
|
||||
|
||||
if (entityIds.length === 0) {
|
||||
|
@ -11,7 +11,9 @@ const selectEntityIds = createMemoizedSelector(selectCanvasV2Slice, (canvasV2) =
|
||||
});
|
||||
|
||||
export const RasterLayerEntityList = memo(() => {
|
||||
const isSelected = useAppSelector((s) => Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'raster_layer'));
|
||||
const isSelected = useAppSelector((s) =>
|
||||
Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'raster_layer')
|
||||
);
|
||||
const layerIds = useAppSelector(selectEntityIds);
|
||||
|
||||
if (layerIds.length === 0) {
|
||||
|
@ -11,7 +11,9 @@ const selectEntityIds = createMemoizedSelector(selectCanvasV2Slice, (canvasV2) =
|
||||
});
|
||||
|
||||
export const RegionalGuidanceEntityList = memo(() => {
|
||||
const isSelected = useAppSelector((s) => Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'regional_guidance'));
|
||||
const isSelected = useAppSelector((s) =>
|
||||
Boolean(s.canvasV2.present.selectedEntityIdentifier?.type === 'regional_guidance')
|
||||
);
|
||||
const rgIds = useAppSelector(selectEntityIds);
|
||||
|
||||
if (rgIds.length === 0) {
|
||||
|
@ -18,7 +18,9 @@ export const RegionalGuidanceSettings = memo(() => {
|
||||
const hasNegativePrompt = useAppSelector(
|
||||
(s) => selectEntityOrThrow(s.canvasV2.present, entityIdentifier).negativePrompt !== null
|
||||
);
|
||||
const hasIPAdapters = useAppSelector((s) => selectEntityOrThrow(s.canvasV2.present, entityIdentifier).ipAdapters.length > 0);
|
||||
const hasIPAdapters = useAppSelector(
|
||||
(s) => selectEntityOrThrow(s.canvasV2.present, entityIdentifier).ipAdapters.length > 0
|
||||
);
|
||||
|
||||
return (
|
||||
<CanvasEntitySettingsWrapper>
|
||||
|
@ -242,7 +242,12 @@ export const buildSD1Graph = async (
|
||||
type: 'collect',
|
||||
id: getPrefixedId('ip_adapter_collector'),
|
||||
});
|
||||
const ipAdapterResult = addIPAdapters(state.canvasV2.present.ipAdapters.entities, g, ipAdapterCollector, modelConfig.base);
|
||||
const ipAdapterResult = addIPAdapters(
|
||||
state.canvasV2.present.ipAdapters.entities,
|
||||
g,
|
||||
ipAdapterCollector,
|
||||
modelConfig.base
|
||||
);
|
||||
|
||||
const regionsResult = await addRegions(
|
||||
manager,
|
||||
|
@ -245,7 +245,12 @@ export const buildSDXLGraph = async (
|
||||
type: 'collect',
|
||||
id: getPrefixedId('ip_adapter_collector'),
|
||||
});
|
||||
const ipAdapterResult = addIPAdapters(state.canvasV2.present.ipAdapters.entities, g, ipAdapterCollector, modelConfig.base);
|
||||
const ipAdapterResult = addIPAdapters(
|
||||
state.canvasV2.present.ipAdapters.entities,
|
||||
g,
|
||||
ipAdapterCollector,
|
||||
modelConfig.base
|
||||
);
|
||||
|
||||
const regionsResult = await addRegions(
|
||||
manager,
|
||||
|
Loading…
x
Reference in New Issue
Block a user