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

No module named 'fairscale' when BLIP captioning on Windows #533

Closed
filloax opened this issue Apr 3, 2023 · 1 comment
Closed

No module named 'fairscale' when BLIP captioning on Windows #533

filloax opened this issue Apr 3, 2023 · 1 comment

Comments

@filloax
Copy link

filloax commented Apr 3, 2023

Title, more or less. Tried running BLIP captioning and got that. fairscale seems to be installed in the venv, as running venv activate and then pip install fairscale says it is already install.

Full log (edited folder names for privacy):

Validating that requirements are satisfied.
All requirements satisfied.
The arguments passed to this script were:
Load CSS...
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Captioning files in C:\Users\filloax\<path>...
./venv/Scripts/python.exe "finetune/make_captions.py" --batch_size="1" --num_beams="1" --top_p="0.9" --max_length="75" --min_length="5" --beam_search --caption_extension=".txt" "C:\Users\filloax\<path>" --caption_weights="https://storage.googleapis.com/sfr-vision-language-research/BLIP/models/model_large_caption.pth"
Traceback (most recent call last):
  File "C:\Dati\Misc_Programmi\KohyaSS\kohya_ss\finetune\make_captions.py", line 13, in <module>
    from blip.blip import blip_decoder
  File "C:\Dati\Misc_Programmi\KohyaSS\kohya_ss\finetune\blip\blip.py", line 13, in <module>
    from blip.vit import VisionTransformer, interpolate_pos_embed
  File "C:\Dati\Misc_Programmi\KohyaSS\kohya_ss\finetune\blip\vit.py", line 21, in <module>
    from fairscale.nn.checkpoint.checkpoint_activations import checkpoint_wrapper
ModuleNotFoundError: No module named 'fairscale'
...captioning done
@filloax
Copy link
Author

filloax commented Apr 3, 2023

Update: reinstalling fairscale inside the venv with pip install --upgrade --no-deps --no-cache-dir --force-reinstall fairscale, so also clearing the cache, worked.

(For people googling this, try this if a module in a venv is acting weird/is "not found")

@filloax filloax closed this as completed Apr 3, 2023
bmaltais pushed a commit that referenced this issue Jun 2, 2023
Added warning on training without captions
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