- erp_image
- rect_image
- erp_image
TY360 Roundtrip gives you a flat, perspective-correct cutout of your 360 photo. You edit that cutout with ordinary nodes - img2img, inpaint, a LoRA pass, whatever you'd do to a normal photo. Then you hit the second half of the loop: TY360 Pasteback re-projects that edited rectangle back onto the sphere at the exact camera pose Roundtrip recorded, and hands you a full-size equirectangular image again.
This is the node that makes the whole roundtrip pattern work, because it never asks you to re-frame or mask anything by hand. The pasteback geometry is driven by the same roundtrip_state string that produced the cutout, so the edit lands where the cutout came from - to sub-pixel precision. One ERP -> Roundtrip -> edit -> Pasteback -> ERP chain and your room is done.
How it works
Pasteback parses the roundtrip_state, then checks two things before it does any work: that the ERP you're feeding it is the same size as the one Roundtrip saw, and that your edited rect has the same aspect ratio as the exported cutout (within a hair under 0.1%). Both checks are deliberate - a mismatched edit would smear across the sphere, so the node would rather throw a clear error than produce garbage.
If everything matches, the rect is treated as an image "sticker" - wrapped with an alpha channel if it doesn't have one - and composited onto the ERP canvas at the recorded yaw, pitch, FOV and roll, with bilinear sampling and alpha blending at the edges. The output is the same size as your source ERP, so nothing downstream has to re-figure your dimensions.
Inputs and output
- erp_image (IMAGE) - the original equirectangular image.
- rect_image (IMAGE) - your edited cutout.
- roundtrip_state (STRING) - the pose + dimension record from TY360 Roundtrip. It's a forced input, meaning it has to be wired in, not typed by hand - which is a nice guardrail, because hand-copying that JSON is a guaranteed way to lose the exact pose.
- erp_image (IMAGE) output - the edited sphere, ready for TY360 Preview,
SaveImage, or more processing.
Installation
Same pack, same story: ComfyUI Manager, search "TY360", or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/supart/ComfyUI-TY360-Photo-Edit
Restart ComfyUI and you're done - no requirements.txt to install, no models to download. It's numpy, torch and PIL, all already present in a stock ComfyUI.
Common issues
- "Aspect ratio does not match." The classic one. Your edit chain resized the cutout - an inpaint pass that outputs 1024×1024 regardless of input, a latent resize, an upscale node. Fix: make sure the edited rect is resized back to the cutout's aspect (or exact size) before it hits Pasteback.
- "ERP size does not match." You resized or upscaled the source ERP between Roundtrip and Pasteback. Keep it untouched; if you genuinely need a bigger sphere, resize at the very end.
- The edit covers a smaller area than expected. That's normal if your rect is smaller than the cutout's aspect - the pasteback covers exactly the cutout footprint. The pack README is explicit: keep the exported aspect ratio so pasteback coverage stays exact.
The pack ships a ready-to-load example (example_workflows/ty360-roundtrip-demo.json) with the whole loop wired - swap the placeholder image for your own 360 photo and you'll have a working sphere-edit pipeline in minutes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| erp_image | IMAGE | — | |
| rect_image | IMAGE | — | |
| roundtrip_state | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| erp_image | IMAGE | — |