Skip to content

Conversation

@lstein
Copy link
Collaborator

@lstein lstein commented Oct 20, 2022

The directory "models" in the main InvokeAI directory was conflicting with loading "models.clipseg". To fix this issue, I have renamed the models.clipseg to clipseg_models.clipseg, and applied this change to the 'models-rename' branch of invoke-ai's fork of clipseg.

After pulling this PR, please delete src/clipseg and rerun conda env update

UPDATE: I have also folded in the !mask command to visualize the regions found by clipseg. See docs/features/INPAINTING.md for the details.

- The directory "models" in the main InvokeAI directory was conflicting
  with loading "models.clipseg". To fix this issue, I have renamed the
  models.clipseg to clipseg_models.clipseg, and applied this change to
  the 'models-rename' branch of invoke-ai's fork of clipseg.
- The directory "models" in the main InvokeAI directory was conflicting
  with loading "models.clipseg". To fix this issue, I have renamed the
  models.clipseg to clipseg_models.clipseg, and applied this change to
  the 'models-rename' branch of invoke-ai's fork of clipseg.
@lstein
Copy link
Collaborator Author

lstein commented Oct 20, 2022

This ought to fix #1150

@psychedelicious
Copy link
Contributor

Followed instructions to re-do the clipseg installation, it works. I did need to run preload_models.py again.

Also, there were issues with the preload_models.py script. I have sorted those out. I've gotta get off the computer, so I have just made a PR to clipseg-fix: #1179

lstein and others added 5 commits October 20, 2022 02:33
- The !mask command takes an image path, a text prompt, and
  (optionally) a masking threshold. It creates a mask over the region
  indicated by the prompt, and outputs several files that show which
  regions will be masked by the chosen prompt and threshold.

- The mask images should not be passed directly to img2img because
  they are designed for visualization only. Instead, use the
  --text_mask option to pass the selected prompt and threshold.

- See docs/features/INPAINTING.md for details.
Copy link
Contributor

@psychedelicious psychedelicious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Tested out the !mask command - works great. The threshold does what it should as well.
  • Feature also works as expected when used with img2img
  • I deleted my src/clipseg/weights dir and re-ran preload_models.py, it re-loaded the models successfully

Awesome feature!

@lstein
Copy link
Collaborator Author

lstein commented Oct 20, 2022

I'm going to take this as a "approve" and force merge.

@lstein lstein merged commit 899ba97 into development Oct 20, 2022
@lstein lstein deleted the clipseg-fix branch October 20, 2022 10:56
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

Successfully merging this pull request may close these issues.

3 participants