TypeError: 'generator' object is not subscriptable

#2
by syddharth - opened

When running the code snippet on the Model card, the following error is encountered :


TypeError Traceback (most recent call last)
/home/syddharth/AI/colab/wuertschen.ipynb Cell 2 line 1
7 pipeline = AutoPipelineForText2Image.from_pretrained(
8 "warp-diffusion/wuerstchen",
9 torch_dtype=dtype,
10 requires_safety_checker=False,
11 ).to(device)
13 caption = "Anthropomorphic cat dressed as a fire fighter"
---> 15 output = pipeline(
16 prompt=caption,
17 height=1024,
18 width=1024,
19 prior_guidance_scale=4.0,
20 decoder_guidance_scale=0.0,
21 ).images

File ~/AI/colab/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py:115, in context_decorator..decorate_context(*args, **kwargs)
112 @functools.wraps(func)
113 def decorate_context(*args, **kwargs):
114 with ctx_factory():
--> 115 return func(*args, **kwargs)

File ~/AI/colab/venv/lib/python3.10/site-packages/diffusers/pipelines/wuerstchen/pipeline_wuerstchen_combined.py:248, in WuerstchenCombinedPipeline.call(self, prompt, height, width, prior_num_inference_steps, prior_timesteps, prior_guidance_scale, num_inference_steps, decoder_timesteps, decoder_guidance_scale, negative_prompt, prompt_embeds, negative_prompt_embeds, num_images_per_prompt, generator, latents, output_type, return_dict)
165 """
166 Function invoked when calling the pipeline for generation.
167
(...)
230 otherwise a tuple. When returning a tuple, the first element is a list with the generated images.
231 """
232 prior_outputs = self.prior_pipe(
233 prompt=prompt if prompt_embeds is None else None,
234 height=height,
(...)
246 return_dict=False,
247 )
--> 248 image_embeddings = prior_outputs[0]
250 outputs = self.decoder_pipe(
251 image_embeddings=image_embeddings,
252 prompt=prompt,
(...)
259 return_dict=return_dict,
260 )
261 return outputs

TypeError: 'generator' object is not subscriptable

syddharth changed discussion status to closed

Sign up or log in to comment