torch numpy==1.26.4 transformers==4.45.0 accelerate diffusers==0.32.2 fastapi<0.113.0 opencv-python

ComfyUI nodes for outpainting images with diffusers, based on diffusers-image-outpaint by fffiloni.
Now also catalogued on plugin.aix.ink! The site is mostly chinese, but it is convenient to consult this and many other extensions from a single, simple catalog. Other infos here. You can find this extension on the catalogue here.
missing 'loaded_keys' error. More details below.sequential_cpu_offload (also thanks to zmwv823) that pushes the vram usage from *8,3 gb* down to _6 gb_.git clone it in comfyui/custom_nodes, then (if comfyui-manager didn’t already install the requirements or you have missing modules), from comfyui virtual env write cd your/path/to/this/extension and pip install -r requirements.txt.⚠ Choosing model and controlnet: As of now, I only tried RealVisXL_V5.0_Lightning and controlnet-union-promax_sdxl. Mixing RealVisXL with controlnet-union (non promax version) gave error, so it could be that other models/controlnets give error as well, but I haven’t tried much combinations so I can’t tell.
Some considerations
Flux is still beyond me (even if I was quite there, I think). I haven’t tried integrating other model types, and after my flux failure I don’t think I’ll try adding other model types.
Since for now only sdxl models work, the configs are hardcoded.
sdxl type model like RealVisXL_V5.0_Lightning, you can download clip_I and clip_g from here. You can use this workflow (change model.fp16 with clip_g).sequential_cpu_offload, otherwise 8,3 gb;The extension gives 5 nodes:
models. You can download them from Huggingface (the extension doesn’t download them automatically). Put them inside the diffusion_models folder. It supports only unets; for whole checkpoints (unet+clip+vae) you can use the checkpoint loader simple by comfyanonimous;models. You can download them from Huggingface (the extension doesn’t download them automatically). Put them inside the controlnet folder;width and height, then resizes it again based on the resize_image percentage, and if possible it will put the mask based on the alignment specified, otherwise it will revert back to the default “middle” alignment;clip text encode (prompt), and specifies what to add to the image;seed option you see is only used to update the UI and generate a new image. You can specify the amount of steps to generate the image.You _can_ also pass image and mask to vae encode (for inpainting) node, then pass the latent to a sampler, but controlnets and ip-adapters won’t always give good results like with diffusers outpaint, and they require a different workflow, not covered by this extension.
Recent versions of transformers and diffusers broke somethings, you need to revert back, command with some working versions (found here) (do it inside your comfyui env): pip install transformers==4.45.0 --upgrade diffusers==0.32.2 --upgrade, or if you use the portable version, run this in ComfyUI_windows_portable -folder:
python_embeded\python.exe -m pip install transformers==4.45.0 --upgrade diffusers==0.32.2 --upgrade.
diffusers-image-outpaint by fffiloni