pkuliyi2015 / multidiffusion-upscaler-for-automatic1111

Tiled Diffusion and VAE optimize, licensed under CC BY-NC-SA 4.0
Other
4.77k stars 334 forks source link

txt2img upscaling in place of HighRes Fix #21

Open Xyem opened 1 year ago

Xyem commented 1 year ago

Can this be used for upscaling instead of HighRes Fix or can upscaling only be done img2img?

pkuliyi2015 commented 1 year ago

If you look at the WebUI's official code, you will find that highres.fix is just an automatic txt2img->img2img process, so they are extremely similar. I don't have the need to move it to txt2img; please just generate and send to img2img.

Xyem commented 1 year ago

Yes, I understand that HighRes Fix is a separate run of img2img to upsize it.. but if this is capable of generating much larger images than can otherwise be created by img2img by my 12GB card, then it would be useful to use it instead of HighRes Fix when generating in batches.

pkuliyi2015 commented 1 year ago

If you are looking for batch generation it is also easy. Just generate batches without highres.fix, and then go to img2img tab. You can see a 'batch' tab near the sketch, inpainting,... tab. You select that and type in your data folder, you will get tons of images processed in batches.

Xyem commented 1 year ago

I know about that too. I know the functions of the UI and they do not suffice for what I am trying to do, hence me asking if this extension can. I want to generate images continuously and have them upscaled as they are generated to a resolution that my GPU can't do in HighRes Fix (1600x1920) but can be done with MultiDiffusion.

pkuliyi2015 commented 1 year ago

I don't quite get your point lol... currently the upscale only support img2img. And I don't think it is necessary to let it replace highres.fix, because normally I do my workflow in txt2img(no highres)->pick good img->img2img upscale;

But if you can give reasons I would consider this. It's not hard to implement. Just for one-pass's convenience?

Xyem commented 1 year ago

The particular use-case is hinted at by the resolution I want to generate at: infinite wallpapers on my 2 portrait orientated monitors. It would also make it work with Generate Forever oriented workflows. But really, just in general, if this is faster and/or can achieve better resolutions that HighRes Fix, it really should be usable in place of it.

AH225D commented 1 year ago

I don't quite get your point lol... currently the upscale only support img2img. And I don't think it is necessary to let it replace highres.fix, because normally I do my workflow in txt2img(no highres)->pick good img->img2img upscale;

But if you can give reasons I would consider this. It's not hard to implement. Just for one-pass's convenience?

yes,i want just for one-pass convenience

andupotorac commented 1 year ago

I don't quite get your point lol... currently the upscale only support img2img. And I don't think it is necessary to let it replace highres.fix, because normally I do my workflow in txt2img(no highres)->pick good img->img2img upscale;

But if you can give reasons I would consider this. It's not hard to implement. Just for one-pass's convenience?

Alright, but if this only works in img2img, why is there present in the text2image interface too? This is so confusing.

pkuliyi2015 commented 1 year ago

I don't quite get your point lol... currently the upscale only support img2img. And I don't think it is necessary to let it replace highres.fix, because normally I do my workflow in txt2img(no highres)->pick good img->img2img upscale; But if you can give reasons I would consider this. It's not hard to implement. Just for one-pass's convenience?

Alright, but if this only works in img2img, why is there present in the text2image interface too? This is so confusing.

text2image is usually used for two cases:

  1. Compositional Generation (regional prompt control)
  2. ControlNet
andupotorac commented 1 year ago

Regional prompt control is part of the UI there in t2i, that makes sense. But ControlNet is in both places. Would be helpful if you clarify why it would be used there for it. Also, I've spent all day going through CLOSED issues to try to figure all this out. Would be good to update on the main page so people know they can't use Tiled for Upscaling on t2i.

pkuliyi2015 commented 1 year ago

I'm sorry but I'm so busy with this. In fact people have made many tutorials about this extension. You can go through these tutorial first.

andupotorac commented 1 year ago

I'm sorry but I'm so busy with this. In fact people have made many tutorials about this extension. You can go through these tutorial first.

I did search, but note I actually managed to use it now after your answers, so thanks. I'm just pointing out how it might come in handy for others too, so they don't go through the same amount of time because of not knowing this:

The use-cases for this app:

  1. Image redraw and upscale (use in img2img)
  2. Wide image drawing (use in txt2img):
    • Compositional Generation (regional prompt control)
    • large image generation with ControlNet
pkuliyi2015 commented 1 year ago

Thank you. I will add your summary to the head of the README.