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

cannot identify image file '/content/fluxgym-Colab/datasets/cr/img001.txt' #303

Open
taichihara opened this issue Jan 18, 2025 · 0 comments

Comments

@taichihara
Copy link

Help me!
I'm using flux gym in google colab, but it doesn't convert my pictures to the dataset. (only the first image passes)
Is it a bug? Who can say what to do?

Taichi


Creating dataset
resize datasets/cr/img001.png : 1024x1024
image_path=datasets/cr/img001.png, caption_path = /content/fluxgym-Colab/datasets/cr/img001.txt, original_caption=ctb. The image is a high-resolution photograph of a boy standing on a boat against a backdrop of a calm, blue ocean. The boy has short, dark hair and is smiling brightly, showing teeth. He is dressed in a winter jacket, predominantly grey with black accents, indicating cool weather. Over his jacket, he wears a black and white life jacket with the word "GUARD" prominently displayed in white letters on the chest area. The life jacket has a blue rope attached to it, possibly for securing it or as a safety line.
Traceback (most recent call last):
File "/usr/local/lib/python3.11/dist-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/content/fluxgym-Colab/app.py", line 93, in create_dataset
resize_image(new_image_path, new_image_path, size)
File "/content/fluxgym-Colab/app.py", line 70, in resize_image
with Image.open(image_path) as img:
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/PIL/Image.py", line 3498, in open
raise UnidentifiedImageError(msg)
PIL.UnidentifiedImageError: cannot identify image file '/content/fluxgym-Colab/datasets/cr/img001.txt'

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