poipiii
commited on
Commit
•
64e0ab0
1
Parent(s):
f9758d9
test change return
Browse files- pipeline.py +20 -20
pipeline.py
CHANGED
@@ -1151,7 +1151,7 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
|
|
1151 |
negative_prompt: Optional[Union[str, List[str]]] = None,
|
1152 |
height: int = 512,
|
1153 |
width: int = 512,
|
1154 |
-
num_inference_steps: int =
|
1155 |
num_inference_steps_upscale: int = 20,
|
1156 |
guidance_scale: float = 7.5,
|
1157 |
strength: float = 0.6,
|
@@ -1186,22 +1186,22 @@ class StableDiffusionLongPromptWeightingPipeline(StableDiffusionPipeline):
|
|
1186 |
)
|
1187 |
image_tensor = torch.from_numpy(image.images[0])
|
1188 |
|
1189 |
-
resized_image = torch.nn.functional.interpolate(
|
1190 |
-
|
1191 |
-
|
1192 |
-
highres_image = self.__call__(prompt=prompt,
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
return
|
|
|
1151 |
negative_prompt: Optional[Union[str, List[str]]] = None,
|
1152 |
height: int = 512,
|
1153 |
width: int = 512,
|
1154 |
+
num_inference_steps: int = 20,
|
1155 |
num_inference_steps_upscale: int = 20,
|
1156 |
guidance_scale: float = 7.5,
|
1157 |
strength: float = 0.6,
|
|
|
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,
|
1194 |
+
# image=resized_image,
|
1195 |
+
# num_inference_steps=num_inference_steps_upscale,
|
1196 |
+
# guidance_scale=guidance_scale,
|
1197 |
+
# strength=strength,
|
1198 |
+
# num_images_per_prompt=num_images_per_prompt,
|
1199 |
+
# eta=eta,
|
1200 |
+
# generator=generator,
|
1201 |
+
# max_embeddings_multiples=max_embeddings_multiples,
|
1202 |
+
# output_type=output_type,
|
1203 |
+
# return_dict=return_dict,
|
1204 |
+
# callback=callback,
|
1205 |
+
# is_cancelled_callback=is_cancelled_callback,
|
1206 |
+
# callback_steps=callback_steps,)
|
1207 |
+
return image
|