Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support SDXL safetensors too! #274

Open
mykeehu opened this issue Oct 21, 2024 · 0 comments
Open

Please support SDXL safetensors too! #274

mykeehu opened this issue Oct 21, 2024 · 0 comments

Comments

@mykeehu
Copy link

mykeehu commented Oct 21, 2024

I have many SDXL models downloaded in .safetensor format, but I can't use them in LCM and LCM-Lora mode. I get this error:

  File "C:\fastsdcpu\env\lib\site-packages\gradio\queueing.py", line 536, in process_events
    response = await route_utils.call_process_api(
  File "C:\fastsdcpu\env\lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
  File "C:\fastsdcpu\env\lib\site-packages\gradio\blocks.py", line 1935, in process_api
    result = await self.call_function(
  File "C:\fastsdcpu\env\lib\site-packages\gradio\blocks.py", line 1520, in call_function
    prediction = await anyio.to_thread.run_sync(  # type: ignore
  File "C:\fastsdcpu\env\lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
  File "C:\fastsdcpu\env\lib\site-packages\anyio\_backends\_asyncio.py", line 2441, in run_sync_in_worker_thread
    return await future
  File "C:\fastsdcpu\env\lib\site-packages\anyio\_backends\_asyncio.py", line 943, in run
    result = context.run(func, *args)
  File "C:\fastsdcpu\env\lib\site-packages\gradio\utils.py", line 826, in wrapper
    response = f(*args, **kwargs)
  File "C:\fastsdcpu\src\frontend\webui\text_to_image_ui.py", line 54, in generate_text_to_image
    images = future.result()
  File "C:\ProgramData\miniconda3\lib\concurrent\futures\_base.py", line 458, in result
    return self.__get_result()
  File "C:\ProgramData\miniconda3\lib\concurrent\futures\_base.py", line 403, in __get_result
    raise self._exception
  File "C:\ProgramData\miniconda3\lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\fastsdcpu\src\context.py", line 59, in generate_text_to_image
    images = self.lcm_text_to_image.generate(
  File "C:\fastsdcpu\src\backend\lcm_text_to_image.py", line 493, in generate
    result_images = self.pipeline(
  File "C:\fastsdcpu\env\lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "C:\fastsdcpu\env\lib\site-packages\diffusers\pipelines\stable_diffusion\pipeline_stable_diffusion.py", line 1000, in __call__
    noise_pred = self.unet(
  File "C:\fastsdcpu\env\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "C:\fastsdcpu\env\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
    return forward_call(*args, **kwargs)
  File "C:\fastsdcpu\env\lib\site-packages\diffusers\models\unets\unet_2d_condition.py", line 1152, in forward
    aug_emb = self.get_aug_embed(
  File "C:\fastsdcpu\env\lib\site-packages\diffusers\models\unets\unet_2d_condition.py", line 969, in get_aug_embed
    if "text_embeds" not in added_cond_kwargs:
TypeError: argument of type 'NoneType' is not iterable

If I download them in Huggingface format, they take up much more space as .safetensor. There are also some SDXL-LCM format models that I would use in LCM mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant