poipiii
commited on
Commit
•
f9758d9
1
Parent(s):
9bee773
test change return
Browse files- pipeline.py +3 -2
pipeline.py
CHANGED
@@ -1161,7 +1161,7 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
|
|
1161 |
generator: Optional[torch.Generator] = None,
|
1162 |
latents: Optional[torch.FloatTensor] = None,
|
1163 |
max_embeddings_multiples: Optional[int] = 3,
|
1164 |
-
output_type: Optional[str] = "
|
1165 |
return_dict: bool = True,
|
1166 |
callback: Optional[Callable[[int, int, torch.FloatTensor], None]] = None,
|
1167 |
is_cancelled_callback: Optional[Callable[[], bool]] = None,
|
@@ -1184,9 +1184,10 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
|
|
1184 |
is_cancelled_callback=is_cancelled_callback,
|
1185 |
callback_steps=callback_steps,
|
1186 |
)
|
|
|
1187 |
|
1188 |
resized_image = torch.nn.functional.interpolate(
|
1189 |
-
|
1190 |
|
1191 |
highres_image = self.__call__(prompt=prompt,
|
1192 |
negative_prompt=negative_prompt,
|
|
|
1161 |
generator: Optional[torch.Generator] = None,
|
1162 |
latents: Optional[torch.FloatTensor] = None,
|
1163 |
max_embeddings_multiples: Optional[int] = 3,
|
1164 |
+
output_type: Optional[str] = "np",
|
1165 |
return_dict: bool = True,
|
1166 |
callback: Optional[Callable[[int, int, torch.FloatTensor], None]] = None,
|
1167 |
is_cancelled_callback: Optional[Callable[[], bool]] = None,
|
|
|
1184 |
is_cancelled_callback=is_cancelled_callback,
|
1185 |
callback_steps=callback_steps,
|
1186 |
)
|
1187 |
+
image_tensor = torch.from_numpy(image.images[0])
|
1188 |
|
1189 |
resized_image = torch.nn.functional.interpolate(
|
1190 |
+
image_tensor, size=(int(height*resize_scale), int(width*resize_scale)))
|
1191 |
|
1192 |
highres_image = self.__call__(prompt=prompt,
|
1193 |
negative_prompt=negative_prompt,
|