Skip to content

Commit 642a953

Browse files
committed
Remove in progress images until we're able to make the valuable
1 parent bb80697 commit 642a953

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

invokeai/app/invocations/flux_text_to_image.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,30 +116,30 @@ def step_callback(img: torch.Tensor, state: PipelineIntermediateState) -> None:
116116
if context.util.is_canceled():
117117
raise CanceledException
118118

119-
# TODO: Make this look like the image
120-
latent_image = unpack(img.float(), self.height, self.width)
121-
latent_image = latent_image.squeeze() # Remove unnecessary dimensions
122-
flattened_tensor = latent_image.reshape(-1) # Flatten to shape [48*128*128]
123-
124-
# Create a new tensor of the required shape [255, 255, 3]
125-
latent_image = flattened_tensor[: 255 * 255 * 3].reshape(255, 255, 3) # Reshape to RGB format
126-
127-
# Convert to a NumPy array and then to a PIL Image
128-
image = Image.fromarray(latent_image.cpu().numpy().astype(np.uint8))
129-
130-
(width, height) = image.size
131-
width *= 8
132-
height *= 8
133-
134-
dataURL = image_to_dataURL(image, image_format="JPEG")
135-
136-
# TODO: move this whole function to invocation context to properly reference these variables
137-
context._services.events.emit_invocation_denoise_progress(
138-
context._data.queue_item,
139-
context._data.invocation,
140-
state,
141-
ProgressImage(dataURL=dataURL, width=width, height=height),
142-
)
119+
# TODO: Make this look like the image before re-enabling
120+
# latent_image = unpack(img.float(), self.height, self.width)
121+
# latent_image = latent_image.squeeze() # Remove unnecessary dimensions
122+
# flattened_tensor = latent_image.reshape(-1) # Flatten to shape [48*128*128]
123+
124+
# # Create a new tensor of the required shape [255, 255, 3]
125+
# latent_image = flattened_tensor[: 255 * 255 * 3].reshape(255, 255, 3) # Reshape to RGB format
126+
127+
# # Convert to a NumPy array and then to a PIL Image
128+
# image = Image.fromarray(latent_image.cpu().numpy().astype(np.uint8))
129+
130+
# (width, height) = image.size
131+
# width *= 8
132+
# height *= 8
133+
134+
# dataURL = image_to_dataURL(image, image_format="JPEG")
135+
136+
# # TODO: move this whole function to invocation context to properly reference these variables
137+
# context._services.events.emit_invocation_denoise_progress(
138+
# context._data.queue_item,
139+
# context._data.invocation,
140+
# state,
141+
# ProgressImage(dataURL=dataURL, width=width, height=height),
142+
# )
143143

144144
x = denoise(
145145
model=transformer,

0 commit comments

Comments
 (0)