-
Notifications
You must be signed in to change notification settings - Fork 441
Feature add DyPE support (experimental) #941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
How much video memory do you have? |
16GB VRAM + 16GB shared memory. But I no longer think the crash is related to OOM issues. Rocm backend just crashes at high resolution (#948). |
|
Just wanted you to try a smaller model, just to add a little more headroom, |
|
@Green-Sky I get the same crash at over 1792x1792, even with a tiny model like https://huggingface.co/Green-Sky/flux-mini-GGUF/blob/main/flux-mini-q4_k.gguf |
|
Wait, I forgot about Well "fine", but still slow, with about 7GB vram to spare still 4096x4096 yields |
|
Not sure if it's because of flash attention or if there's a bug somewhere, But I can't get any good results at high resolution, either with or without dype. Since I'm using previews, I can see that the first step generally looks okay-ish, but it gets darker and less detailed at every subsequent step. High resolution results look the same kind of broken as when using CFG with Flux (blurry, overly contrasted and so on), But i double checked that CFG is not enabled. |
|
I’m not sure whether generating ultra-high-resolution images would cause problems for models that weren’t specifically trained for that purpose — for example, internal NaNs. Previously, I tried using relatively large images as context inputs, which ended up producing black images, while using lower-resolution inputs worked fine. |
|
It looks like it's inducing some (slight) distorsions on non-square resolutions, maybe the "base resolution" should be made aware of the targeted aspect ratio... |
This doesn't seem to happen with Vulkan btw, ROCm only. |
CUDA on my rtx 2070 (8gig). The model I linked looked fine, and I think slightly better without rope scaling at that resolution. |












https://github.com/guyyariv/DyPE/tree/master
Flux only for now, I don't have enough VRAM to test it at very high resolutions (seems to be working at 1536x1536 resolution, but it should be tested at up to 4096x4096 to be completely sure it's working as intended)
Use env vraiables to enable it:
FLUX_ROPE=DY_YARN,DY_NTK,YARN, orNTK(any other value will use standard RoPE)FLUX_DYPE_BASE_RESOLUTION(defaults to1024which should be best for base Flux,maybe use512for Chroma? (untested yet)768seems to work for Chroma, for some reason512didn't perform well at all in my testing, maybe use1024too)Example:
.\build\bin\sd.exe --diffusion-model ..\ComfyUI\models\unet\Flux\dev\flux1-dev-Q3_k.gguf --t5xxl ..\ComfyUI\models\clip\t5\t5xxl_q8_0.gguf --clip_l ..\ComfyUI\models\clip\clip_l\clip_l.safetensors --vae ..\ComfyUI\models\vae\flux\ae.safetensors -p "a lovely cat holding a sign says 'Flux cpp'" --cfg-scale 1 --sampling-method euler -W 1536 -H 1536 --vae-tiling --vae-tile-size 64(base resolution 1024)