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
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'
# upon completion increase step index by one
self._step_index += 1 <---Error here
IndexError: index 29 is out of bounds for dimension 0 with size 29
sigma_next = self.sigmas[self.step_index + 1] <--- Error here
RuntimeError: Already borrowed
if _truncation is not None:
self._tokenizer.no_truncation() <--- Error here
Example: RuntimeError: Already borrowed tokenizers#537
The reason, as I understood, is threads. Do you know, how can I solve this problem?
Reproduction
from diffusers import (
FluxPipeline,
FlowMatchEulerDiscreteScheduler,
)
import torch
pipeline = FluxPipeline.from_pretrained(
"black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16
).to("cuda")
seed = 42
height = 720
width = 1280
generator = torch.Generator(device="cuda").manual_seed(seed)
pipeline(
prompt=prompt + ", highly detailed, all is depicted as silhouettes, without words",
guidance_scale=0.,
# num_inference_steps=10,
height=height,
width=width,
generator=generator,
max_sequence_length=256,
).images[0]
Logs
For example:
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/conda/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/app/main.py", line 29, in generate_image
image = imagegen.run(**data)
File "/app/image_generator.py", line 102, in run
returngenerate_image()
File "/app/image_generator.py", line 89, in generate_image
return self.pipeline(
File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/diffusers/pipelines/flux/pipeline_flux.py", line 734, in __call__
latents = self.scheduler.step(noise_pred, t, latents, return_dict=False)[0]
File "/opt/conda/lib/python3.10/site-packages/diffusers/schedulers/scheduling_flow_match_euler_discrete.py", line 295, in step
sigma_next = self.sigmas[self.step_index + 1]
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Describe the bug
I have three problems because of the same reason.
# upon completion increase step index by one
self._step_index += 1 <---Error here
sigma_next = self.sigmas[self.step_index + 1] <--- Error here
if _truncation is not None:
self._tokenizer.no_truncation() <--- Error here
Example: RuntimeError: Already borrowed tokenizers#537
The reason, as I understood, is threads. Do you know, how can I solve this problem?
Reproduction
Logs
System Info
Who can help?
@yiyixuxu @sayakpaul @DN6