Outpainting in ComfyUI: Extend Your Photos with MOSS AnyPaint

Outpainting in ComfyUI: Extend Your Photos with MOSS AnyPaint

In qualità di Affiliato Amazon io ricevo un guadagno dagli acquisti idonei.As an Amazon Associate I earn from qualifying purchases.En calidad de Afiliado de Amazon, obtengo ingresos por las compras adscritas que cumplen los requisitos aplicables.

You have a vertical photo and you need it in 16:9 for a video thumbnail. Or the subject is cropped too tight and the client wants room on the sides for a headline. That's a job for outpainting: getting AI to draw what lies beyond the edges of the image. Outpainting in ComfyUI has been around for years, but the classic method often leaves a visible seam between the real photo and the invented part. On November 13, MOSS AnyPaint came out: a 149 MB LoRA (a small file that adds a skill to a model) that extends the image in a single pass and in 8 steps.

Where do we stand? We care about it for two reasons: the license is Apache 2.0 and the files are small compared to what we're used to. But it's an unofficial release from a single developer, it's three days old, and the author doesn't say how much video memory it needs. We haven't tried it yet on our 12 GB RTX 3060. Here you'll find what has been declared, the files to download with their sizes, and the limits written down by the author.

What it isA LoRA for MOSS-Image-Base that does outpainting, free-mask inpainting and mixed edits, with three nodes for ComfyUI
Who made ityijunwang2 on Hugging Face (community release, not endorsed by OpenMOSS); nodes by alexw5702-afk on GitHub
Video memory requirednot declared
Does it run on a 12 GB RTX 3060?on paper yes (the model weighs 5.41 GB), but nobody states it and we haven't tried it yet
LicenseApache 2.0 for the weights, MIT for the node code
Commercial use from Italyyes, no regional exclusion declared
Where to download itHugging Face (yijunwang2/moss-anypaint) and GitHub (alexw5702-afk/moss-anypaint)
Free or paidfree

What is MOSS AnyPaint and what changes for outpainting in ComfyUI?

It's an add-on file that teaches MOSS-Image-Base to fill empty areas of an image, inside or outside its edges. MOSS-Image-Base is the image model with about 5 billion parameters that OpenMOSS published in October under the Apache 2.0 license, and ComfyUI has supported it natively since then. The official model card has no inpainting mode: that's the part AnyPaint adds.

The classic method, the one in the official ComfyUI outpainting guide, uses the Pad Image for Outpainting node: it adds a gray border, creates the mask and asks an inpainting model to fill it. It works, but you have to tune the edge feathering by hand and you often need a second pass to hide the seam.

AnyPaint works differently. The Prepare node builds a small reference from the photo (384 pixels on the longest side) that tells the model what's in the scene, and it redraws a 32-pixel band along the seam to blend it. According to the project page on Hugging Face, one generation can handle canvas extension, several separate regions and masks that cross the border. So you can add sky above and change an object in the middle with a single click on Run.

How much video memory does it need, and does it run on 12 GB?

Nobody says: the page only asks for "a CUDA GPU with BF16 support". What we can do is look at the file sizes in the Comfy-Org/MOSS-Image repository, which is the most honest clue we have.

  • Model: moss_image_base_int8_convrot.safetensors, 5.41 GB (int8 is a version compressed to 8 bits; the full bf16 one weighs 10.2 GB).
  • Text encoder, the part that reads the prompt: qwen3.5_9b_int8_convrot.safetensors, 9.75 GB.
  • VAE (the component that turns the model's data into pixels): flux2-vae_small.safetensors.
  • AnyPaint LoRA: moss_anypaint_rank32.safetensors, 149 MB.
  • 8-step DMD2 LoRA, from the lodestones/MOSS-Image-Base-8-steps-dmd repository: it's the distilled version, trained to do in a few steps what the model does in many.

A 5.41 GB model fits easily in 12 GB of VRAM (the graphics card's memory). The big piece is the 9.75 GB text encoder, which ComfyUI loads to read the prompt and then moves to system RAM: with 32 GB of RAM it should get through, with 16 GB we expect slowdowns. This is an estimate based on file sizes. If you're picking a model based on your card, the full comparisons are in our guide to AI image models in ComfyUI.

How do outpainting and inpainting work with the AnyPaint nodes?

With three nodes in a row: MOSS AnyPaint Prepare, MOSS AnyPaint Encode and MOSS AnyPaint Model Patch. The first one takes the photo, the mask (optional) and four numbers: the pixels to add on the left, top, right and bottom.

For outpainting you type the pixels on the side you want to extend and you don't draw any mask. The canvas sides are rounded up to the next multiple of 16. For inpainting (redrawing an area inside the image) you leave the four values at 0 and connect a mask: white gets regenerated, black stays as it is. The mask can come from the Mask Editor or from a model that creates it from a word, like the one we used for cutting out subjects with WeVisOne-VL.

One detail changes the results: the prompt describes the finished image. You write "beach at sunset with a red umbrella", not "add an umbrella". The settings in the bundled workflow are 8 steps, CFG 1, euler sampler with simple scheduler, shift 5 and both LoRAs at strength 1.0. The author only measured this configuration, so at first it's better to leave it alone.

Can you use it for client work, and what are the limits?

As far as the license goes, yes: Apache 2.0 allows commercial use, from Italy too, and it covers the base model, the DMD2 LoRA and AnyPaint. On reliability we're more careful. As of November 16, the node repository on GitHub is three days old, with one star and one open issue, and the training data isn't public.

The limits come from the author, to their credit. Very large generated areas can bring in subjects that don't belong. Thin details like hair and wires remain the hard case. The mask has to cover the whole object you're replacing, or a fringe is left behind. And pixels outside the mask can change slightly, because the whole image goes through the VAE anyway.

For us, that last point decides how to use it. To extend a background, a thumbnail or a banner, it's fine. For retouching a product photo, where every pixel of the subject has to stay identical, we'd composite the original back over the result in Photoshop at the end. If all you need is to erase an object, the LoRA we covered in the article on how to remove objects from photos in ComfyUI in 6 steps is still the more direct route, though it comes with a research-only license.

Try it now

Here's the simplest test: turning a vertical photo into a horizontal one.

  1. Update ComfyUI to a recent version and check that the MOSS-Image template works.
  2. Open a terminal in the ComfyUI/custom_nodes folder, run git clone https://github.com/alexw5702-afk/moss-anypaint and restart ComfyUI. The README doesn't mention ComfyUI Manager.
  3. Download the files: the int8 model into models/diffusion_models, the text encoder into models/text_encoders, the VAE into models/vae, the two LoRAs into models/loras. For the DMD2 LoRA the README asks for the file lora_dmd2.safetensors: check the name before you download.
  4. Drag the moss_anypaint_workflow.json file from the repository into ComfyUI.
  5. Load the photo and type 512 in the left and right fields of the Prepare node. The others stay at 0.
  6. In the prompt, describe the whole extended scene, including what's already in the photo.
  7. Run the generation and look at the seams at 100%. If a stray subject shows up, change the seed, or extend less and repeat in two rounds.

If you'd rather work in a photo editor than among nodes, there's the route we described in the article on generative fill in GIMP with OpenFill. If you've never opened ComfyUI, start with our beginner's guide to ComfyUI.

More news

  • PAN 2 native in ComfyUI (November 15): the 29-billion-parameter video model from MBZUAI lands in the core code through a change by Kijai. The int8 file weighs 26.7 GB and the published timings were measured on an RTX 5090: not something for a 12 GB card. You need a build newer than 0.45.0.
  • NKD Event Curve (November 15): a node where you draw a curve to decide at which moment of the clip the action happens with MiniMax H3. It's part of NKD Basic Tools, version 1.27.0. A reminder: the MiniMax H3 license excludes the European Union.
  • ComfyUI 0.45.2 (November 12): fixes some workflows that stopped loading after 0.45. Details in the official changelog.

Frequently asked questions

What's the difference between outpainting and inpainting?

Inpainting redraws an area inside the image, for example to replace an object or fix a hand. Outpainting adds image outside the edges, to change the format or give the subject more room. MOSS AnyPaint does both with the same three nodes, even in the same generation.

Is MOSS AnyPaint an official OpenMOSS model?

No. It's a community release published on Hugging Face by the user yijunwang2, and the page states that the MOSS-Image authors have not endorsed it. It does use the official MOSS-Image-Base model as its base, and both the LoRA and the model are licensed under Apache 2.0.

Do you need to draw a mask for outpainting in ComfyUI?

Not with AnyPaint: you tell the Prepare node how many pixels to add on each side, and the new area is worked out automatically. You only need a mask if you also want to change something inside the photo. With the classic method, the Pad Image for Outpainting node creates the mask.

Can I use it with FLUX or Qwen-Image?

No, this LoRA is trained for MOSS-Image-Base and doesn't work on other models. The same node developer has published a separate version for Krea 2 on GitHub. For FLUX and Qwen-Image you still use the outpainting workflows made for those models.

On our YouTube channel @tutorial3d you'll find the videos with free workflows to download.

Tutorial3d
Grafico - Videodesigner - VisualFX

Ti consigliamo anche:



#Devo averlo!

VIDEO

INSPIRATION IN YOUR INBOX

Una mail. Un tutorial. Niente rumore.

Ti scrivo un solo tutorial scelto, con file progetto e note tecniche. Senza promozioni, senza affiliate. Cancellabile in un click.

[newsletter_form]