mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes intermediate images being tiny in txt2img/img2img
This commit is contained in:
parent
e358adecdd
commit
d018b2d7a7
@ -18,13 +18,11 @@
|
||||
height: 100%;
|
||||
|
||||
img {
|
||||
background-color: var(--img2img-img-bg-color);
|
||||
border-radius: 0.5rem;
|
||||
object-fit: contain;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
height: auto;
|
||||
width: max-content;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -10,7 +10,10 @@ import {
|
||||
} from 'features/gallery/store/gallerySlice';
|
||||
import { createSelector } from '@reduxjs/toolkit';
|
||||
import _ from 'lodash';
|
||||
import { OptionsState, setIsLightBoxOpen } from 'features/options/store/optionsSlice';
|
||||
import {
|
||||
OptionsState,
|
||||
setIsLightBoxOpen,
|
||||
} from 'features/options/store/optionsSlice';
|
||||
import ImageMetadataViewer from './ImageMetaDataViewer/ImageMetadataViewer';
|
||||
|
||||
export const imagesSelector = createSelector(
|
||||
@ -30,6 +33,7 @@ export const imagesSelector = createSelector(
|
||||
|
||||
return {
|
||||
imageToDisplay: intermediateImage ? intermediateImage : currentImage,
|
||||
isIntermediate: Boolean(intermediateImage),
|
||||
viewerImageToDisplay: currentImage,
|
||||
currentCategory,
|
||||
isOnFirstImage: currentImageIndex === 0,
|
||||
@ -56,6 +60,7 @@ export default function CurrentImagePreview() {
|
||||
isOnLastImage,
|
||||
shouldShowImageDetails,
|
||||
imageToDisplay,
|
||||
isIntermediate,
|
||||
} = useAppSelector(imagesSelector);
|
||||
|
||||
const [shouldShowNextPrevButtons, setShouldShowNextPrevButtons] =
|
||||
@ -89,6 +94,9 @@ export default function CurrentImagePreview() {
|
||||
width={imageToDisplay.width}
|
||||
height={imageToDisplay.height}
|
||||
onClick={handleLightBox}
|
||||
style={{
|
||||
imageRendering: isIntermediate ? 'pixelated' : 'initial',
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{!shouldShowImageDetails && (
|
||||
|
Loading…
Reference in New Issue
Block a user