Qwen3.8-27B-ComfyUI / README.md
Rom3rk's picture
Upload README.md
72b8c73 verified
|
Raw
History Blame Contribute Delete
4.99 kB
---
base_model:
- Qwen/Qwen3.8-27B
base_model_relation: finetune
license: apache-2.0
library_name: transformers
pipeline_tag: image-text-to-text
tags:
- transformers
- safetensors
- qwen3.8
- conversational
- comfyui
- fine-tuned
- sft
- unsloth
- vision-language
- mtp
---
# Qwen3.8-27B-ComfyUI
Qwen3.8-27B-ComfyUI is a fine-tuned Qwen3.8-27B model specialized for generating, editing, repairing, auditing, and explaining ComfyUI frontend/UI workflow JSON.
## Overview
```text
ComfyUI request
-> interpret workflow intent and constraints
-> generate, edit, repair, audit, or explain
-> return workflow JSON or a conversational answer
```
## Capabilities
- Generate ComfyUI UI workflows from natural-language requests
- Edit existing workflows while preserving requested components
- Repair invalid, incomplete, or disconnected workflows
- Audit workflow structure, nodes, inputs, and links
- Explain workflow behavior and node interactions
- Provide raw workflow JSON or conversational ComfyUI assistance
## Quick Start
Install the required libraries:
```bash
pip install --upgrade transformers accelerate safetensors
```
```python
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
MODEL_ID = "Rom3rk/Qwen3.8-27B-ComfyUI"
ENABLE_THINKING = False
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForImageTextToText.from_pretrained(
MODEL_ID,
dtype=torch.bfloat16,
device_map="auto",
).eval()
messages = [
{
"role": "user",
"content": [
{
"type": "text",
"text": (
"Create a ComfyUI UI workflow for an SDXL image-to-image "
"pipeline with a ControlNet depth branch and return the "
"complete loadable UI workflow JSON."
),
}
],
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
enable_thinking=ENABLE_THINKING,
return_dict=True,
return_tensors="pt",
).to(model.device)
with torch.inference_mode():
generated_ids = model.generate(
**inputs,
max_new_tokens=4096,
do_sample=True,
temperature=0.7,
top_p=0.8,
top_k=20,
)
new_tokens = generated_ids[:, inputs.input_ids.shape[1]:]
response = processor.batch_decode(
new_tokens,
skip_special_tokens=True,
clean_up_tokenization_spaces=False,
)[0]
print(response)
```
The model uses Qwen's native chat template. Set `ENABLE_THINKING` according to the task and inference runtime rather than replacing the template.
## Usage Examples
### Workflow Generation
```text
Create a ComfyUI UI workflow for an SDXL image-to-image pipeline with a ControlNet depth branch, a two-stage sampler, and a final image-save node. Return the complete loadable UI workflow JSON.
```
### Workflow Editing
```text
Modify the following ComfyUI UI workflow to add a second ControlNet branch. Preserve the existing model, sampler settings, node positions, and unrelated links.
```
### Workflow Repair
```text
Repair the invalid links and missing required inputs in this ComfyUI UI workflow. Keep all valid nodes and settings unchanged, and return the corrected workflow JSON.
```
### Workflow Audit
```text
Audit this ComfyUI UI workflow for invalid endpoints, disconnected nodes, incompatible inputs, redundant components, and settings that conflict with the requested generation pipeline.
```
## Recommended Sampling Settings
| Mode | Temperature | Top-p | Top-k | Presence penalty |
|---|---:|---:|---:|---:|
| Thinking | 1.0 | 0.95 | 20 | 0.0 |
| Non-thinking | 0.7 | 0.80 | 20 | 1.5 |
These settings follow the recommendations published for Qwen3.8. Availability and parameter names may vary by inference runtime.
## Questions and Feedback
For questions, bug reports, workflow compatibility issues, or general feedback, please open a Discussion from this repository's **Community** tab.
When reporting a workflow issue, please include:
- Inference runtime and version
- ComfyUI version
- Relevant custom nodes
- The original prompt
- The generated workflow JSON or raw model output
## License and Attribution
This model is a modified derivative of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) and is distributed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). See the repository's `LICENSE` file for the full license text.
Qwen3.8 was developed by the Qwen Team. Model fine-tuning and merging used [Unsloth](https://unsloth.ai/).
## Citation
```bibtex
@misc{qwen38,
title = {{Qwen3.8-Max}: A New Bar for Coding and Cowork},
author = {{Qwen Team}},
month = {August},
year = {2026},
url = {https://qwen.ai/blog?id=qwen3.8}
}
```
## References
- [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B)
- [Unsloth](https://unsloth.ai/)
- [Transformers](https://huggingface.co/docs/transformers/)