Files

94 lines
2.6 KiB
Markdown

# ComfyUI Qwen FrameKit
Custom nodes for ComfyUI workflows that use Qwen image editing, camera-angle LoRAs, and aspect-aware image resizing.
## Nodes
### Qwen Image Edit 2511 Angle Camera
Applies a fixed Qwen Image Edit 2511 multiple-angles LoRA and emits a matching `<sks>` camera prompt.
Inputs:
- `model`
- `clip`
- `image`
- `azimuth`
- `elevation`
- `distance`
- `strength_model`
- `strength_clip`
- `auto_download_lora`
Outputs:
- `model`
- `clip`
- `prompt`
The browser UI includes a 3D camera map. Drag inside the map to change azimuth/elevation, and use the mouse wheel to change distance.
Required LoRA file:
```text
ComfyUI/models/loras/qwen-image-edit-2511-multiple-angles-lora.safetensors
```
The node does not include model weights. When `auto_download_lora` is enabled, the node downloads the LoRA from `fal/Qwen-Image-Edit-2511-Multiple-Angles-LoRA` on Hugging Face the first time it is needed and saves it to the first configured ComfyUI `loras` folder. Disable `auto_download_lora` to manage the file manually at the path above.
### Camera Angle Prompt Combine
Combines the camera LoRA prompt with an edit prompt.
### Camera Angle Selector
Legacy multi-angle selector that outputs selected camera prompts.
### Smart Aspect Resize
Resizes an image while controlling aspect ratio, width, and height. The image input is optional, so the node can also be used as an aspect-ratio size calculator.
Inputs:
- `image` (optional)
- `aspect_ratio`: `from image`, `custom`, or a preset ratio
- `width`
- `height`
- `locked`: `aspect_ratio`, `width`, or `height`
- `fit`: `contain`, `crop`, `pad`, or `stretch`
- `upscale_method`
- `snap_to`
- `custom_aspect_width`
- `custom_aspect_height`
- `pad_color`
Outputs:
- `image`
- `width`
- `height`
- `aspect_ratio`
- `original_width`
- `original_height`
When `aspect_ratio` is `from image`, the frontend reads the connected `LoadImage` dimensions when available so changing width or height updates the other side from the source image ratio.
When no image is connected, the node still outputs the calculated `width`, `height`, and `aspect_ratio`. Its `image` output is a blank placeholder at the calculated size, and `original_width` / `original_height` are `0`.
## Install
Clone this repository into your ComfyUI `custom_nodes` folder:
```powershell
cd C:\Temp\ComfyUI\custom_nodes
git clone https://github.com/uron83/ComfyUI-Qwen-FrameKit.git
```
Restart ComfyUI and hard refresh the browser.
## Notes
- The fixed camera LoRA is intentionally not stored in this repo.
- `Smart Aspect Resize` uses ComfyUI and PyTorch APIs already available in a normal ComfyUI install.
- No extra Python packages are required.