Scale Crafter ๐
Generating past your model's native resolution without a second pass
- model
- MODEL
Every model has a resolution it was trained at, and generating well past it produces the same tell-tale mess: duplicated heads, extra limbs, tiled/repeated patterns where the network runs out of trained-in spatial sense and just repeats itself to fill the frame. The usual fix is hires-fix - generate small, then upscale in a second pass. ScaleCrafter is a different approach: a model patch that lets you generate directly at a higher resolution in one pass, tuning-free, no retraining.
The pack's README credits the original technique - YingqingHe/ScaleCrafter, a real 2023 paper ("tuning-free ... can generate images with resolution of 4096ร4096 ... 16 times higher than the original training resolution"). This node is cgem156-ComfyUI's own implementation of a slice of that idea, wired as a model patch rather than a pipeline.
How it works
The mechanism is convolution dilation. A conv layer's receptive field - how much of the image it "sees" at once - is fixed by its kernel and dilation at training time, tuned for the resolution the model was trained on. Push the output resolution up without changing that, and the network's convolutions can no longer see far enough to keep large-scale structure coherent - hence the duplicated anatomy. ScaleCrafter widens the receptive field on the fly by dilating those kernels, so the network can perceive coherent structure at the larger canvas, then hands back to normal convolution once structure is locked in and only fine detail remains.
That's why start/end here are raw timesteps (0โ1000, matching a 1000-step training schedule) rather than the 0โ1 fractions you'll see elsewhere in this pack - the dilation only needs to apply during the early, structure-forming part of the denoising trajectory. Default start=0, end=500 means dilation covers roughly the first half of sampling; after that, the model reverts to normal convolutions for detail work.
The inputs that matter
model- patched, outputMODELwires straight into your KSampler like normal.dilation_rate(0.01โ10, default 1) - how much the receptive field widens. 1 is effectively off. There's no documented formula tying this to your target resolution multiple, so treat it as a dial: start around 1.0โ2.0 for a modest bump over native resolution and push higher only if you're still seeing duplication.depth(0โ12, default 0) - which of the UNet's block depths get dilated. Default is the most conservative setting; raise it if the effect isn't strong enough at your target resolution.start/end(0โ1000, default 0/500) - the timestep window dilation is active for, out of a 1000-step schedule.
Installing it
Via ComfyUI Manager: search cgem156-ComfyUI, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI
Restart afterward. Nothing extra to download - this is a pure model patch, no external weights.
Common issues & troubleshooting
No visible effect. If you're generating within your model's native range already (1024ร1024 on SDXL, for instance), ScaleCrafter has nothing to fix - this is a past-native-resolution tool, not a general quality booster. It'll do nothing useful, or slightly soften the image, if there's no resolution problem to solve.
Still seeing duplicated anatomy at your target resolution. Raise dilation_rate before touching anything else - that's the primary knob. If artifacts show up in the coarse structure rather than fine detail, widen end so dilation stays active longer.
Works, but detail looks soft. That's the tradeoff of stretching a receptive field meant for a smaller canvas - this technique fixes gross structure, not fine detail. Pairing it with a normal hires-fix or ControlNet Tile pass afterward for detail is expected, not a sign something's wrong; the two techniques solve different halves of the same problem.
No dedicated writeup exists for this exact node - the underlying ScaleCrafter paper is well documented, but this specific ComfyUI implementation isn't, so the dilation_rate-to-resolution mapping above is a starting point to tune from rather than a fixed formula.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | โ | |
| dilation_rate | FLOAT | 1.000.01โ10 | โ |
| depth | INT | 00โ12 | โ |
| start | INT | 00โ1000 | โ |
| end | INT | 5000โ1000 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | โ |