HuiZhang commited on
Commit
3beddd6
·
verified ·
1 Parent(s): 676c130

Update src/pipeline/pipeline_CreatiLayout.py

Browse files
src/pipeline/pipeline_CreatiLayout.py CHANGED
@@ -299,7 +299,7 @@ class CreatiLayoutSD3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingleF
299
  pooled_prompt_embeds = prompt_embeds[0]
300
 
301
  if clip_skip is None:
302
- prompt_embeds = prompt_embeds.hidden_states[-2] #倒数第二层
303
  else:
304
  prompt_embeds = prompt_embeds.hidden_states[-(clip_skip + 2)]
305
 
@@ -313,7 +313,7 @@ class CreatiLayoutSD3Pipeline(DiffusionPipeline, SD3LoraLoaderMixin, FromSingleF
313
  pooled_prompt_embeds = pooled_prompt_embeds.repeat(1, num_images_per_prompt, 1)
314
  pooled_prompt_embeds = pooled_prompt_embeds.view(batch_size * num_images_per_prompt, -1)
315
 
316
- return prompt_embeds, pooled_prompt_embeds #clip-L [B,77,768], [B,768] #clip-G [B,77,1280], [B,1280]
317
 
318
  def encode_prompt(
319
  self,
 
299
  pooled_prompt_embeds = prompt_embeds[0]
300
 
301
  if clip_skip is None:
302
+ prompt_embeds = prompt_embeds.hidden_states[-2]
303
  else:
304
  prompt_embeds = prompt_embeds.hidden_states[-(clip_skip + 2)]
305
 
 
313
  pooled_prompt_embeds = pooled_prompt_embeds.repeat(1, num_images_per_prompt, 1)
314
  pooled_prompt_embeds = pooled_prompt_embeds.view(batch_size * num_images_per_prompt, -1)
315
 
316
+ return prompt_embeds, pooled_prompt_embeds
317
 
318
  def encode_prompt(
319
  self,