Need guidance with Mochi Diffusion

#2
by Gomeo - opened

I'm getting mixed messages in the discord, so thought I'd post this here. I'm struggling to get controlnet working with Mochi Diffusion. I've updated to Mochi Diffusion 4.0 through the Check for updates...menu item in the top nav dropdown.

  1. In Settings > Under ControlNet Folder Clicking the magnifying icon does not do anything
    image.png
  2. Opening up the folder using Model Folder instead, I see that no controlnet folder was created upon updating to Mochi Diffusion v4.0
    image.png
  3. I downloaded DreamShaper v5.0 Original 768X768 For ControlNet and ran it, hoping it would automatically create the missing controlnet folder (and alias, according to some user in Discord), still nothing.
    image.png
    image.png
  4. I then made the folder structure manually, adding controlnet folder inside mochi diffusion, then downloading, unzipping and adding the openpose mlmodelc folder inside that.
    image.png
  5. The ControlNet function is still grayed out and unusable in Mochi Diffusion and clicking the magnifying icon to open up the folder in Settings > Under ControlNet Folder still doesn't do anything, indicating to me Mochi Diffusion is still not recognising ControlNet
    image.png

Any guidance on getting this working would be greatly appreciated. As suggested in the Discord, perhaps a screenshot of the path/working folder structure might help others to manually get controlnet working with MochiDiffusion as a work around.

Core ML Models org
β€’
edited Jun 7, 2023

Sorry to be away from Discord the past week. Was on an out of town trip with not much free time. I'll try to get back on tomorrow the latest.

I think the issue is the subfolders. Try with the individual 723.1 mlmodelc files placed directly in the "controlnet" folder, eliminating the "OpenPose" folder. I realize now this is confusing because a folder is ok (and necessary) when you unzip a main model file. The only reason there is an OpenPose folder was because of the zipping of the 4 individual files. Each file is an actual model, so each file needs to go directly in the "controlnet" model store folder. Post back if that is the fix for you and I'll add this info to the README. And thank you for asking here.

Screencap.jpg

Screencap 1.jpg

Hello and thx @jrrjrr for all your great work for Mochi Diffusion.
I am trying to get ControlNet running in version 4.0 following your instructions. My issues is that I am seeing .mlmodelc like folders. Do you know pls, what might be the solution to see those files like on your image?
Screenshot 2023-06-08 at 10.13.42 AM.png

Core ML Models org

An .mlmodelc file is actually a "package", which is basically a folder. If I right click on my Canny-5x5.mlmodelc file, for example, I can select "Show Package Contents", and I get what you see in the screen cap below. This is probably the same thing you see if you click on your Canny-5x5.mlmodelc folder.

So the issue is that your system does not know that a .mlmodelc folder should be treated as a package. Also when I right click on mine, I get an option to "Open With" Xcode. So it is possible that one needs Xcode installed in order for the system to know that an .mlmodelc folder is to be treated as a package. All of the developers who work on Mochi have Xcode installed, so it is possible we would not ever see them as folders, and if that is a problem with making them work, we would not know there is a problem.

Is it really a problem, or are you just getting a different Finder display from me?

Does your Mochi not "see" and list the different ControlNet modules that you put in your controlnet folder when you try to use a ControlNet?

Are you using one of the ControlNet capable base models from this repo when you try to use ControlNet? (Your base model needs to have a ControlledUnet.mlmodelc in it, not just a Unet.mlmodelc.)

Screencap.jpg

Core ML Models org

I copied the Canny-5x5.mlmodelc file to an old laptop that runs Catalina (10.15.7) and that also doesn't have Xcode, and Finder sees it as a folder, not a file type. So how it displays is either a function of the macOS version or having Xcode installed. It probably does not matter in Mochi Diffusion, as long as you are using a version of macOS that can run Mochi in the first place. Mochi Diffusion needs macOS Ventura 13.1 or later.

Thanks @jrrjrr and sorry for my delayed response. I installed Xcode and now I see it like on your screenshot πŸ‘.
The catch now is to find model that supports Control Net. Feel free to share a link which one I can download and test?

Core ML Models org

Thanks for adding the info that Xcode is the key for getting them to display correctly.

There are 6 base models right here in this repo. Go to "Files and versions" near the top of this page and then go to the "SD" folder in the list. Or use this link to get to them directly: https://huggingface.co/jrrjrr/CoreML-Models-For-ControlNet/tree/main/SD . There are four individual model versions, at different sizes, in each folder. Download any you want, unzip, and put them in your models folder along with your regular models. (You can rename an individual model folder to anything you want. You can also rename individual CN models, as long as you keep the .mlmodelc part at the end.) The main page at this repo has a list of the 6 models along with a word or two about what they are focused on - regular, anime or NSFW.

Core ML Models org

UPDATE: The six base models noted above have been relocated to individual repos. Each one is accessible from a link provided in the Base Model list at the bottom of the main page here. The "SD" folder here has been removed.

Sign up or log in to comment