- Dec 21, 2020
- 1,527
- 3,597
If I want a let's say 2K picture in 16:9 ratio (for youtube videos), what's the starting resolution I need to in the empty latent image?
1280x720 is kinda high to start out.. but I guess I can just start with half these values, if I am correct that 2x upscaling means doubling the resolution..You must be registered to see the links
It's what I use to answer these questions whenever I have them.
When rendering with SD1.5 based models, I always keep one of the dimensions 512px, and just increase the other to get the screen ratio I want.1280x720 is kinda high to start out.. but I guess I can just start with half these values, if I am correct that 2x upscaling means doubling the resolution..
But YYYYx512 upscaled by two wouldn't make 1080, would it? That would equal 1024. That's why I thought I have to use values that, doubled or tripled up, create the desired target resolution.When rendering with SD1.5 based models, I always keep one of the dimensions 512px, and just increase the other to get the screen ratio I want.
I believe there might be an option for upscaling to a target resolution rather than using multiplier. I have no idea how it works in ComfyUi though..But YYYYx512 upscaled by two wouldn't make 1080, would it? That would equal 1024. That's why I thought I have to use values that, doubled or tripled up, create the desired target resolution.
Or am I getting wrong how upscaling works.
No, you're not wrong. But you can upscale both by a multiplier (like 2x), or to an exact size as well, if you want to go that route.But YYYYx512 upscaled by two wouldn't make 1080, would it? That would equal 1024. That's why I thought I have to use values that, doubled or tripled up, create the desired target resolution.
Or am I getting wrong how upscaling works.
I believe the technical description of the cause of those lines around the image is "it do be like that sometimes".So i'm struggling slightly with providing much details on this, i've included the prompt i started with, but i'm not sure how much help it'll be.
The reason i guess can be summed up with "inpainting"...
The general (and very repeating) workflow is just (re)loading image, drawing mask(s) and painting in more/new/replacing.
Somewhere along the line i've managed to get a white line at the top and bottom, no idea when or why that showed up.
Then when i did the final slight denoising and upscaling to "blend" things, it made it look like she has dried snot coming up and out from her left nostril...classy lady, probably has bigger things on her mind.
View attachment 3322590
You don't have permission to view the spoiler content. Log in or register now.
I would suggest the same as hkennereth. Simply fix those things in photoshop, it's much easier and faster than trying to chase down the issue and then try to get the same image again. Knowing SD, it's not gonna happen..So i'm struggling slightly with providing much details on this, i've included the prompt i started with, but i'm not sure how much help it'll be.
The reason i guess can be summed up with "inpainting"...
The general (and very repeating) workflow is just (re)loading image, drawing mask(s) and painting in more/new/replacing.
Somewhere along the line i've managed to get a white line at the top and bottom, no idea when or why that showed up.
Then when i did the final slight denoising and upscaling to "blend" things, it made it look like she has dried snot coming up and out from her left nostril...classy lady, probably has bigger things on her mind.
View attachment 3322590
You don't have permission to view the spoiler content. Log in or register now.
The workflow was shared and explained by one of the developers at OpenAI itself, who work together with ComfyUI.Okay @Fuchsschweif... you're going over a ton of different questions that have different unrelated answers... and you have a picture of a workflow that honestly raises more questions than it answers (why are you calculating the upscale factor from the source image there, instead of just inputting something like 2x into the Ultimate Upscale node itself?).
"Controlnet tile" sounded like another tiled encoder/decoder to me, so since those are the ones preventing my system from crashes, I thought they might be a solution.But using ControlNet increases processing time and memory usage, so if you're using a limited and old graphics card that will only make things worse.
The computer completely shuts off immediately, no bluescreen no nothing. I have to take it from the power for 5-10 seconds in order to turn it on again, which points at a problem with the memory needing to unload. I already explained this in the past pages.None of that probably has anything to do with your crashing problem... which you need to be more specific about anyway. What do you mean by "crashes your computer"?
I know that, and yet it has. The crash is happening because the VRAM is probably coming to its limits. A tiled VAE encoder would help me to prevent that. So I thought about whether there's an option to incorporate a tiled version of an encoder into this workflow. I tried the switch at the bottom of the upscaler but that one didn't work.Edit: also, I forgot to mention that: you don't need a Tiled VAE Encoder/Decoder there. The Upscale node already outputs a pixel file, so there is no reason or point to encoding the image back to a latent image, just to decode it back to pixels so you can save it. That has zero to do with your crashing issue.
Yeah, but that's why it doesn't make sense. The original field is already a numerical factor, the default value is 2. That means that it will take whatever image size you put there, and make it two times larger. It doesn't matter what the original image size is. I'm not sure what that thing is trying to accomplish there, but it seems mostly useless to me.The upscale factor is calculated from the source image itself, so that you can throw in whatever picture you want and upscale it as many times as you want. You don't have to do the math anymore since these mathematical operators will gather the width and height of the original and feed the correct values into the upscaler, so that you always get the correct upscale values out of it.
It's not, ControlNet is a way to get information from a source image and use it to help create a new one by providing information about the general shape of the source. In particular, the Tiled processor for ControlNet is to be used in conjunction with tiled upscalers, breaking the source image into discreet "slices" that are upscaled one at a time, and then merged together to build the larger image. It CAN be used in conjunction with Ultimate SD Upscaler, but it won't do anything to help with your issue, it will just add more VRAM usage since ControlNet requires some considerable amount of VRAM to use."Controlnet tile" sounded like another tiled encoder/decoder to me, so since those are the ones preventing my system from crashes, I thought they might be a solution.
That really sounds like a hardware issue to me, probably related to overheating. There is nothing about Stable Diffusion or Comfy UI that can cause computer crashes like that, and I can assure you that there isn't much you can do with Comfy to completely solve this for you because computers don't crash when they run out of VRAM, they just fail to execute (like the red error messages I asked you were seeing). The fact you haven't had this happen when using Tiled VAE Codecs is just a coincidence because they for whatever reason haven't made the computer run as hot, but that isn't the underlying issue, and focusing on this part is just a band-aid. Open your machine and check if your fans are working properly.The computer completely shuts off immediately, no bluescreen no nothing. I have to take it from the power for 5-10 seconds in order to turn it on again, which points at a problem with the memory needing to unload. I already explained this in the past pages.
(...)
With the tiled VAE versions I've had 0 crashes, while the regular ones often crash my system when they reach 99% and are about to drop the final picture.
The Ultimate SD Upscaler doesn't need a VAE Encoder/Decoder because it does that internally. Images need to be in Latent Space for the KSamplers to generate an image, and they need to be in Pixel format for image manipulation like cropping. That plugin slices the image into a grid of overlapping image tiles, and then starts encoding each tile, running it through an img2img Ksampler, decodes it, and then does the same for the next tile. Then it takes all these pixel images and puts them all together back into that grid, slightly over each other with faded edges to help avoid the edges between tiles being visible.The crash is happening because the VRAM is probably coming to its limits. A tiled VAE encoder would help me to prevent that. So I thought about whether there's an option to incorporate a tiled version of an encoder into this workflow. I tried the switch at the bottom of the upscaler but that one didn't work.
If you have an original image of 1024x1024 or 1920x1080 matters, because you would always need to input the correct numbers. But this way it will gather the height and width and then only upscale it by twice or four times or as much as you wish. So that you don't have to change the values manually for any picture you load in.Yeah, but that's why it doesn't make sense. The original field is already a numerical factor, the default value is 2. That means that it will take whatever image size you put there, and make it two times larger. It doesn't matter what the original image size is. I'm not sure what that thing is trying to accomplish there, but it seems mostly useless to me.
This can't be. With the tiled VAE encoder I can produce 50 pictures in a row and get my machine really to give me all its power without any crash. I can easily upscale to 1920x1080. ( I never had a single shutdown when I use the tiled VAE encoder with probably by now over 200-300 generations)That really sounds like a hardware issue to me, probably related to overheating.
Well, whatever it is, it has to do with something that the encoder requires, and that's as far as I am concerned the vram. There seems to be an issue when dropping the final picture (at 99%) that causes my computer to shut off. And the tiled version prevents this. Since the tiled versions splits up the process in different parts, so that VRAM usage is lower, that's my suggestion.and I can assure you that there isn't much you can do with Comfy to completely solve this for you because computers don't crash when they run out of VRAM
This seems not to be the case. I have tried both with dozens of generations and the pattern I described above is replicable every time.You seem to have a misunderstanding of what the Tiled VAE Codecs do; there is no magic to them that prevents crashes, so much that using the standard VAE Encoder/Decoder nodes will automatically switch to using Tiled mode if the image is too large to be converted normally after it fails the first attempt.
Look, I don't know what else I could tell you. As I said before, that node doesn't need any VAE Encode or Decoder nodes added before or after it, because it already includes that functionality internally as it does that continuously for each tile it process.This can't be. With the tiled VAE encoder I can produce 50 pictures in a row and get my machine really to give me all its power without any crash. I can easily upscale to 1920x1080. ( I never had a single shutdown when I use the tiled VAE encoder with probably by now over 200-300 generations)
I got that, my reply was referring to the idea, that those shutdowns would be overheating-related.Look, I don't know what else I could tell you. As I said before, that node doesn't need any VAE Encode or Decoder nodes added before or after it, because it already includes that functionality internally as it does that continuously for each tile it process.
I am not mistaking correlation for causation. I am telling you that with the tiled encoders I never got a single crash in hundreds of generations, while a standard decoder will crash my system instantly even with way less demanding upscalings.Forgive my bluntness, but you are committing the classic error of mistaking correlation for causation. I don't know WHAT is causing your issue because I don't have access to your machine, but it's not the presence or absence of a Tiled Encoder/Decoder, that's the only certain thing here.
I never claimed that it's SD or comfyui alone. I described when it happens, so that these informations might lead to ideas, what could be happining in the background.It does not crash one's machine. That's a problem with YOUR machine, not with ComfyUI or with Stable Diffusion.
I'm with hkennereth -- it's most probably an overheating issue. I'm more than 95% sure about that.You said my shutdowns would have nothing to do with whether using the tiled or normal nodes, but that's in fact how it is.
I can also not tell you why that is, but it is like that.
Sorry, but you are making that mistake. Yes, those things happened, I believe you, but you are jumping to the conclusion that one is then the CAUSE of the other, and I'm exhaustingly explaining you why that cannot be the case. And you keep insisting that you should be able to add that node somewhere in your workflow to solve the problem, despite the explanation of why that node has no function on that workflow, because the functionality it provides is already happening somewhere else. The node does not perform any magic, and as I explained on the previous post, you can get the exact same functionaly by using that toggle at the bottom, the one you said didn't work for you.I am not mistaking correlation for causation. I am telling you that with the tiled encoders I never got a single crash in hundreds of generations, while a standard decoder will crash my system instantly even with way less demanding upscalings.
You said my shutdowns would have nothing to do with whether using the tiled or normal nodes, but that's in fact how it is.
I can also not tell you why that is, but it is like that.