You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but the code in image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]
get
TypeError Traceback (most recent call last)
Cell In[8], line 4
1 generator = torch.Generator().manual_seed(0)
2 # xm.mark_step compiles and executes the graph after each iteration.
3 # The first few steps will be much slower than the rest.
----> 4 image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]
5 image
File /usr/local/lib/python3.8/site-packages/torch/utils/_contextlib.py:115, in context_decorator.<locals>.decorate_context(*args, **kwargs)
112 @functools.wraps(func)
113 def decorate_context(*args, **kwargs):
114 with ctx_factory():
--> 115 return func(*args, **kwargs)
File /usr/local/lib/python3.8/site-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py:1035, in StableDiffusionPipeline.__call__(self, prompt, height, width, num_inference_steps, timesteps, sigmas, guidance_scale, negative_prompt, num_images_per_prompt, eta, generator, latents, prompt_embeds, negative_prompt_embeds, ip_adapter_image, ip_adapter_image_embeds, output_type, return_dict, cross_attention_kwargs, guidance_rescale, clip_skip, callback_on_step_end, callback_on_step_end_tensor_inputs, **kwargs)
1033 if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
1034 progress_bar.update()
-> 1035 if callback is not None and i % callback_steps == 0:
1036 step_idx = i // getattr(self.scheduler, "order", 1)
1037 callback(step_idx, t, latents)
TypeError: unsupported operand type(s) for %: 'int' and 'NoneType'
how to fix the problem?
The text was updated successfully, but these errors were encountered:
❓ Questions and Help
I follow the https://github.com/pytorch/xla/blob/master/contrib/kaggle/pytorch-xla-2-0-on-kaggle.ipynb
but the code in image = pipeline(prompt, callback=lambda *args: xm.mark_step(), generator=generator).images[0]
get
how to fix the problem?
The text was updated successfully, but these errors were encountered: