Skip to content

Commit

Permalink
Mirror the upstream implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Jul 7, 2023
1 parent 5ba5cc9 commit 98154ec
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions discord_tron_client/classes/image_manipulation/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,6 @@ def _run_pipeline(
if not promptless_variation and image is None:
# text2img workflow
if "ptx0/s1" in user_config.get("model", ""):
encoded_embeds = pipe.encode_prompt(
prompt=positive_prompt,
negative_prompt=negative_prompt,
device=self.pipeline_manager.device,
num_images_per_prompt=batch_size,
prompt_embeds=prompt_embed,
negative_prompt_embeds=negative_embed,
)
preprocessed_images = pipe(
prompt_embeds=prompt_embed,
num_images_per_prompt=batch_size,
Expand All @@ -235,8 +227,8 @@ def _run_pipeline(
guidance_scale=guidance_scale,
output_type=image_return_type,
generator=generator,
pooled_prompt_embeds=encoded_embeds[2],
pooled_negative_prompt_embeds=encoded_embeds[3]
pooled_prompt_embeds=prompt_embed[0],
pooled_negative_prompt_embeds=negative_embed[0]
).images
elif "ptx0/s2" in user_config.get("model", ""):
preprocessed_images = pipe(
Expand Down

0 comments on commit 98154ec

Please sign in to comment.