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

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:

pip install --upgrade transformers accelerate safetensors
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

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

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

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

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 and is distributed under the Apache 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.

Citation

@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

Downloads last month
-
Safetensors
Model size
28B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Rom3rk/Qwen3.8-27B-ComfyUI

Base model

Qwen/Qwen3.8-27B
Finetuned
(217)
this model
Quantizations
2 models