MoonRide303 / Fooocus-MRE

Focus on prompting and generating
GNU General Public License v3.0
934 stars 56 forks source link

What is ON - image-2-image, Revision , CN - Control-LoRA: Canny, Control-LoRA: Depth and inpaint - error #114

Open mirek190 opened 10 months ago

mirek190 commented 10 months ago

What is ON - image-2-image, Revision , CN - Control-LoRA: Canny, Control-LoRA: Depth

..and I try to inpaint generated image - loft , right , bottom

and gutting error :

Traceback (most recent call last): File "E:\DIFFUSION\Fooocus-MRE\Fooocus-MRE-env\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "E:\DIFFUSION\Fooocus-MRE\Fooocus-MRE-env\lib\threading.py", line 953, in run self._target(*self._args, self._kwargs) File "E:\DIFFUSION\Fooocus-MRE\Fooocus-MRE\modules\async_worker.py", line 582, in worker handler(task) File "E:\DIFFUSION\Fooocus-MRE\Fooocus-MRE-env\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "E:\DIFFUSION\Fooocus-MRE\Fooocus-MRE-env\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "E:\DIFFUSION\Fooocus-MRE\Fooocus-MRE\modules\async_worker.py", line 206, in handler inpaint_mask = inpaint_input_image['mask'][:, :, 0] TypeError: 'NoneType' object is not subscriptable

mirek190 commented 10 months ago

Also noticed when loras are ON pictures has resolution 1024x1024 ignoring default resolution 1152×896 (9:7)

MoonRide303 commented 10 months ago

"Enhance Image" ("Input Image" in vanilla) is new way of altering input images from vanilla - some users asked for having it in MRE, so I merged it. It should work used as standalone feature, but it's still pretty fresh (and big) addiction to MRE, so it might fail to work when combined with MRE features. Thank you for reporting it.

MoonRide303 commented 10 months ago

I've added automatic disabling of Image-2-Image when Enhance Image is active - those 2 functions are different way of performing img2img. While I can imagine making it work together it will be probably easier to understand for most users if they'll be working separately.

Revision and Control-LoRAs might work with Enhance Image, so I left them as they are.

When Image-2-Image mode is active then it uses aspect ratio of the original input images - this is intentional, as it allows you to process multiple input images with different dimensions, like that: image -> image

mirek190 commented 10 months ago

Nice

Thank you.!

MoonRide303 commented 10 months ago

@mirek190 Please take a look at this new version, and let me know if it still crashes in similar scenarios. I played it for a bit and it seemed fine, but I already missed like 3 or 4 major f.ckups today, so... help with testing appreciated ;P.

mirek190 commented 10 months ago

Just tested - works!

But I think could be a better solution just to grey image-2-image checkbox after choosing enhance image ( with small information that should appear below checkbox when is grey .

Also CN and image-2-image should be on the bottom as one of the tabs under enhance image ( as all those setting are related as picture manipulation )

Also under CN would be great to see canny or depth generated pictures and possibility to save them and use later.

barepixels commented 10 months ago

Been inpainting last 6 hours. Works great.

Voting for this

"Also under CN would be great to see canny or depth-generated pictures and possibility to save them and use later."

Plus the preview would help with the sliders

MoonRide303 commented 10 months ago

In one of future version I will probably have to make CNs more flexible, with selectable both models and preprocessors, and - like you've said - access to preprocessor output.

One downside of that is it might become a bit confusing for end-users who didn't use CNs previously (it's not obvious how it works until you see it in action a few times).

barepixels commented 10 months ago

No rush because I can make depth map with A1111