ShuaixinHuang/image-multiple-angles-3d-camera: 3D Camera Control for Qwen Image Edit
🎬 Generate images from any camera viewpoint via 3D interactive control. Drag the camera in 3D space or use sliders to set azimuth/elevation/distance, then generate. Built with Three.js + Gradio, bilingual ZH/EN UI.
At a glance
- What is it?
- A Gradio app that drives Qwen-Image-Edit-Plus through Three.js camera controls, so you pick an azimuth, elevation and distance and generate the matching viewpoint. It is small, bilingual and self-hostable, but the viewpoint accuracy is a property of the backend model, not of this repository.
- Who is it for?
- Adopt it if you already have an Alibaba Cloud Bailian API key and want a self-hosted 3D camera control front end for Qwen-Image-Edit-Plus, or if you plan to swap in your own model through infer_camera_edit. Do not adopt it if you need exact viewpoint math, sub-degree angle control, or a documented licence, because the README carries an MIT badge while the repository has no LICENSE file.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 22 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on September 17, 2026, and from our analysis. They are not legal advice.
DEEP OPEN-SOURCE ANALYSIS
What the 3D camera control front end is for
The README frames the project as a response to paid camera viewpoint tools, naming Alibaba's MultipleAngles as the example, and states that this repository reproduces the same 3D camera viewpoint control and multi-angle generation on the official free API quota. That is the pitch: a local Gradio page where you upload one image, move a camera in a Three.js scene, and get a new image from that viewpoint.
The intended user is someone doing creative or product work who needs several shots of the same subject without reshooting. The repository is a Python project with a bilingual ZH/EN interface, and the README lists image editing and image generation among its topics. It is not a model. It is the control surface and the request builder around one.
How the Three.js camera maps to a generation request
The mechanism is split across two files. app.py, app_zh.py and app_en.py hold the Gradio interface, and core.py holds infer_camera_edit, the function that turns a camera position plus the uploaded image into a model call. The README states that replacing infer_camera_edit is the supported way to attach any image editing model, which makes core.py the seam in the architecture.
The camera state is not free. Azimuth is restricted to 0, 45, 90, 135, 180, 225, 270 and 315 degrees. Elevation is restricted to -30, 0, 30 and 60 degrees, and the README says straight up and straight down are not supported. Distance is the only continuous axis, running from 0.6 to 1.8 in steps of 0.05. That gives 8 azimuths times 4 elevations, 32 discrete view combinations, each with a distance value.
In the 3D widget, a green handle drags azimuth around the horizontal ring and a pink handle drags elevation along the arc. Distance has no handle and is set by the slider under the scene. The uploaded image is textured onto a plane in the 3D view, so the preview and the slider values describe the same camera. The README notes that the angle accuracy comes from the viewpoint prompt and is a feature of Qwen-Image-Edit-Plus, warning that other models may not reproduce a specified viewpoint precisely.
Install image-multiple-angles-3d-camera and generate a first viewpoint
The README recommends the API path, which needs no GPU. It requires an Alibaba Cloud account and is billed per call. Get a key from the Alibaba Cloud Bailian page linked in the README, then expose it as an environment variable. On Linux or macOS the README gives this form:
export DASHSCOPE_API_KEY="your-api-key"On Windows PowerShell the README uses the equivalent assignment:
$env:DASHSCOPE_API_KEY = "your-api-key"The README also says you can paste the key into API_KEY inside core.py instead. Then install the three API-mode packages from requirements.txt, which are gradio>=4.0, dashscope>=1.20 and pillow>=9.0:
pip install -r requirements.txtStart the interface. app_zh.py gives the Chinese UI, app_en.py the English one, and app.py takes an optional en argument:
python app_en.pyThe README states the app serves at http://127.0.0.1:7860. Open that address, upload an image, drag the green and pink handles or pick one of the six presets (Front, Right, Back, Left, Aerial, Close-up), set distance with the slider, and press generate. The result appears in the output panel and is also collected in the History Gallery tab, which supports download and clear. If you want to reproduce a result later, fix the seed, since the README lists an adjustable seed and negative prompt.
The 56 GB local deployment and what it costs you
The second installation path in the README is local inference. It requires an NVIDIA GPU, suggests RTX 3090 or better, asks for 16 GB or more of VRAM and 60 GB or more of free disk, and notes roughly 56 GB of model download. That is a different class of commitment from the API path, and the README presents it as optional.
The local path installs the API dependencies plus a longer list, and the README additionally names gradio, diffusers, transformers, accelerate, peft, safetensors, sentencepiece and torchvision. requirements.txt keeps the same extras commented out, including a diffusers install from the Hugging Face git repository and torchao==0.11.0. You then replace infer_camera_edit with a pipeline that loads Qwen/Qwen-Image-Edit-2511 plus two LoRA adapters, lightx2v/Qwen-Image-Edit-2511-Lightning and fal/Qwen-Image-Edit-2511-Multiple-Angles-LoRA, and sets both adapter weights to 1.0.
Two things stand out. The README does not document rollback, model caching, or what happens when the LoRA files change upstream, so treat the pinned model identifiers as the reproducibility contract you have to maintain yourself. And the LoRA naming suggests the multiple-angles behaviour is trained rather than computed, which matches the README's own warning that other models may not hit the requested angle.
Where this is the wrong tool
The angle grid is the first limit. You cannot ask for 17 degrees of azimuth or 45 degrees of elevation, because the UI only offers the fixed values listed above. If your work needs an exact camera solve, this is the wrong tool, and no amount of prompt engineering changes the enumeration.
The second limit is that the repository does not own the accuracy. The README is explicit that precise angle control via the viewpoint prompt is a Qwen-Image-Edit-Plus characteristic and that other models may fail to reproduce a specified viewpoint. So if you swap in a different backend through infer_camera_edit, the 3D widget still works but the output may not match the camera you set. The widget is the promise; the model is the delivery.
Third, the API path depends on an external account and per-call billing. The README calls this out directly. There is no offline mode without the 56 GB download, and no documented fallback when the API is unavailable. Finally, the licence is unresolved: the README displays an MIT badge that links to LICENSE, but the repository's top-level entries do not include a LICENSE file. Until that is settled, treat the licence as unknown rather than MIT.
Compared with the hosted MultipleAngles space
The obvious alternative is the hosted Hugging Face Space that this project mirrors in spirit, multimodalart/qwen-image-multiple-angles-3d-camera. Both expose a 3D camera control over Qwen image editing, and the search phrasing around this project mostly points at that Space.
The difference is where the code and the key live. The Space runs on someone else's hardware with someone else's quota, and you get whatever interface it ships. This repository runs on your machine, keeps your API key in DASHSCOPE_API_KEY or core.py, and lets you edit the Gradio layout and the bilingual strings. The cost of that control is setup: Python 3.10 or newer, three packages, and a key, or the full local stack with a 16 GB GPU. If you only want to try the effect once, the hosted Space is less work. If you want the camera widget inside your own pipeline or behind your own UI, the repository is the one you can modify.
Editorial conclusion
Adopt it if you already have an Alibaba Cloud Bailian API key and want a self-hosted 3D camera control front end for Qwen-Image-Edit-Plus, or if you plan to swap in your own model through infer_camera_edit. Do not adopt it if you need exact viewpoint math, sub-degree angle control, or a documented licence, because the README carries an MIT badge while the repository has no LICENSE file. Before anything else, open core.py and confirm which backend infer_camera_edit actually calls.
Frequently asked questions
Does image-multiple-angles-3d-camera need a GPU?
Not in API mode. The README states the API path starts fast and needs no GPU, using only the three packages in requirements.txt. The optional local deployment requires an NVIDIA GPU with 16 GB or more VRAM and about 56 GB of model download.
Which angles can I set in image-multiple-angles-3d-camera?
Azimuth is limited to 0, 45, 90, 135, 180, 225, 270 and 315 degrees, and elevation to -30, 0, 30 and 60 degrees, with straight up and straight down unsupported. Distance is continuous from 0.6 to 1.8 in steps of 0.05.
Can I use image-multiple-angles-3d-camera with a model other than Qwen-Image-Edit-Plus?
The README says the project is not tied to one model and that replacing the infer_camera_edit function in core.py attaches any image editing model. It also warns that precise angle control through the viewpoint prompt is specific to Qwen-Image-Edit-Plus, so another model may not reproduce the requested viewpoint.
Community notes