t-montes commited on
Commit
cb3dd77
·
verified ·
1 Parent(s): 78abfe0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,7 +46,7 @@ pipe = FluxControlNetPipeline.from_pretrained(
46
  pipe.to(device)
47
 
48
  MAX_SEED = 1000000
49
- MAX_PIXEL_BUDGET = 2048 * 2048
50
 
51
  def process_input(input_image, upscale_factor, **kwargs):
52
  w, h = input_image.size
@@ -126,7 +126,7 @@ with gr.Blocks(css=css) as demo:
126
  This is an interactive demo of [Flux.1-dev Upscaler ControlNet](https://huggingface.co/jasperai/Flux.1-dev-Controlnet-Upscaler) taking as input a low resolution image to generate a high resolution image.
127
  Currently running on {power_device}.
128
 
129
- *Note*: Even though the model can handle higher resolution images, due to GPU memory constraints, this demo was limited to a generated output not exceeding a pixel budget of 2048x2048. If the requested size exceeds that limit, the input will be first resized keeping the aspect ratio such that the output of the controlNet model does not exceed the allocated pixel budget. The output is then resized to the targeted shape using a simple resizing. This may explain some artifacts for high resolution input. To adress this, run the demo locally or consider implementing a tiling strategy. Happy upscaling! 🚀
130
  """
131
  )
132
 
 
46
  pipe.to(device)
47
 
48
  MAX_SEED = 1000000
49
+ MAX_PIXEL_BUDGET = 1024 * 1024
50
 
51
  def process_input(input_image, upscale_factor, **kwargs):
52
  w, h = input_image.size
 
126
  This is an interactive demo of [Flux.1-dev Upscaler ControlNet](https://huggingface.co/jasperai/Flux.1-dev-Controlnet-Upscaler) taking as input a low resolution image to generate a high resolution image.
127
  Currently running on {power_device}.
128
 
129
+ *Note*: Even though the model can handle higher resolution images, due to GPU memory constraints, this demo was limited to a generated output not exceeding a pixel budget of 1024x1024. If the requested size exceeds that limit, the input will be first resized keeping the aspect ratio such that the output of the controlNet model does not exceed the allocated pixel budget. The output is then resized to the targeted shape using a simple resizing. This may explain some artifacts for high resolution input. To adress this, run the demo locally or consider implementing a tiling strategy. Happy upscaling! 🚀
130
  """
131
  )
132