|
19 | 19 | - [License](#license)
|
20 | 20 | - [Thanks :purple\_heart:](#thanks-purple_heart)
|
21 | 21 |
|
22 |
| -If this is the first time to use it, it is recommended to use a rewritten new project [FooocusAPI](https://github.com/mrhan1993/FooocusAPI) |
| 22 | +> Note: |
| 23 | +> |
| 24 | +> Fooocus 2.5 includes a significant update, with most dependencies upgraded. Therefore, after updating, do not use `--skip-pip` unless you have already performed a manual update. |
| 25 | +> |
| 26 | +> Additionally, `groundingdino-py` may encounter installation errors, especially in Chinese Windows environments. The solution can be found in the following [issue](https://github.com/IDEA-Research/GroundingDINO/issues/206). |
| 27 | +
|
| 28 | + |
| 29 | +> GenerateMask is same as DescribeImage, It is not process as a task, result will directly return |
| 30 | +
|
| 31 | +# Instructions for Using the ImageEnhance Interface |
| 32 | +Below are examples of parameters that include the main parameters required for ImageEnhance. The V1 interface adopts a form-like approach similar to ImagePrompt to break down the enhance controller. |
| 33 | + |
| 34 | + |
| 35 | +```python |
| 36 | +{ |
| 37 | + "enhance_input_image": "", |
| 38 | + "enhance_checkbox": true, |
| 39 | + "enhance_uov_method": "Vary (Strong)", |
| 40 | + "enhance_uov_processing_order": "Before First Enhancement", |
| 41 | + "enhance_uov_prompt_type": "Original Prompts", |
| 42 | + "save_final_enhanced_image_only": true, |
| 43 | + "enhance_ctrlnets": [ |
| 44 | + { |
| 45 | + "enhance_enabled": false, |
| 46 | + "enhance_mask_dino_prompt": "face", |
| 47 | + "enhance_prompt": "", |
| 48 | + "enhance_negative_prompt": "", |
| 49 | + "enhance_mask_model": "sam", |
| 50 | + "enhance_mask_cloth_category": "full", |
| 51 | + "enhance_mask_sam_model": "vit_b", |
| 52 | + "enhance_mask_text_threshold": 0.25, |
| 53 | + "enhance_mask_box_threshold": 0.3, |
| 54 | + "enhance_mask_sam_max_detections": 0, |
| 55 | + "enhance_inpaint_disable_initial_latent": false, |
| 56 | + "enhance_inpaint_engine": "v2.6", |
| 57 | + "enhance_inpaint_strength": 1, |
| 58 | + "enhance_inpaint_respective_field": 0.618, |
| 59 | + "enhance_inpaint_erode_or_dilate": 0, |
| 60 | + "enhance_mask_invert": false |
| 61 | + } |
| 62 | + ] |
| 63 | +} |
| 64 | +``` |
| 65 | + |
| 66 | +- enhance_input_image: The image to be enhanced, which is required and can be provided as an image URL for the V2 interface. |
| 67 | +- enhance_checkbox: A toggle switch that must be set to true if you want to use the enhance image feature. |
| 68 | +- save_final_enhanced_image_only: Since image enhancement is a pipeline operation, it can produce multiple result images. This parameter allows you to only return the final enhanced image. |
| 69 | + |
| 70 | +There are three parameters related to UpscaleVary, which are used to perform Upscale or Vary before or after enhancement. |
23 | 71 |
|
24 |
| -A migration guide is provided [here](./docs/migrate.md). |
| 72 | +- enhance_uov_method: Similar to the UpscaleOrVary interface, Disabled turns it off. |
| 73 | +- enhance_uov_processing_order: Determines whether to process the image before or after enhancement. |
| 74 | +- enhance_uov_prompt_type: I'm not sure about the specific function; you might want to research it based on the WebUI. |
25 | 75 |
|
26 |
| -# :warning: Compatibility warning :warning: |
| 76 | +The `enhance_ctrlnets` element is a list of ImageEnhance controller objects, with a maximum of three elements in the list, any additional elements will be discarded. The parameters correspond roughly to the WebUI, and the notable parameters are: |
27 | 77 |
|
28 |
| -When upgrading from version 3.x to version 4.0, please read the following incompatibility notes: |
| 78 | +- enhance_enabled: This parameter controls whether the enhance controller is active. If there are no enabled enhance controllers, the task will be skipped. |
| 79 | +- enhance_mask_dino_prompt: This parameter is required and indicates the area to be enhanced. If it is empty, even if the enhance controller is enabled, the task will be skipped. |
29 | 80 |
|
30 |
| -1. If you are using an external Fooocus model (that is, the model is not located in the `repositories` directory), delete the `repositories` directory directly, and then update the `git pull`. |
31 |
| -2. If not, move the `repositories` directory to any directory, delete the `repositories` directory, then update the `git pull`, and move the `models` directory back to its original location when it is finished. |
32 | 81 |
|
33 | 82 | # Introduction
|
34 | 83 |
|
|
0 commit comments