Skip to content

Commit

Permalink
Change range of scaling to 0 to 8.
Browse files Browse the repository at this point in the history
  • Loading branch information
yownas committed Jan 21, 2023
1 parent 7c726ed commit beef29d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ So, interpolating between the noise from two seeds will not only look cool as a

`Upscaler`: Choose upscale method to be applied to the images before made into a video.

`Upscale ratio`: How much the images should be upscaled. A value of 1 will disable scaling.
`Upscale ratio`: How much the images should be upscaled. A value of 0 or 1 will disable scaling.

`Bump seed`: If this is set higher than 0, instead of traveling to the destination seeds you will get a number of images based on the initial seed, mixed with the destination seeds. Perfect for when you have an almost perfect image but want to nudge it a little to see if you can improve it.

Expand Down
4 changes: 2 additions & 2 deletions scripts/seed_travel.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def ui(self, is_img2img):
lead_inout = gr.Number(label='Number of frames for lead in/out', value=0)
with gr.Row():
upscale_meth = gr.Dropdown(label='Upscaler', value=lambda: DEFAULT_UPSCALE_METH, choices=CHOICES_UPSCALER)
upscale_ratio = gr.Slider(label='Upscale ratio', value=lambda: DEFAULT_UPSCALE_RATIO, minimum=1.0, maximum=4.0, step=0.1)
upscale_ratio = gr.Slider(label='Upscale ratio', value=lambda: DEFAULT_UPSCALE_RATIO, minimum=0.0, maximum=8.0, step=0.1)
bump_seed = gr.Slider(label='Bump seed (If > 0 do a Compare Paths but only one image. No video will be generated.)', value=0.0, minimum=0, maximum=1, step=0.01)
use_cache = gr.Checkbox(label='Use cache', value=True)
show_images = gr.Checkbox(label='Show generated images in ui', value=True)
Expand Down Expand Up @@ -210,7 +210,7 @@ def run(self, p, rnd_seed, seed_count, dest_seed, steps, unsinify, loopback, sav

# upscale - copied from https://github.com/Kahsolt/stable-diffusion-webui-prompt-travel
tgt_w, tgt_h = round(p.width * upscale_ratio), round(p.height * upscale_ratio)
if upscale_meth != 'None' and upscale_ratio > 1.0:
if upscale_meth != 'None' and upscale_ratio != 1.0 and upscale_ratio != 0.0:
image = [resize_image(0, proc.images[0], tgt_w, tgt_h, upscaler_name=upscale_meth)]
else:
image = proc.images
Expand Down

0 comments on commit beef29d

Please sign in to comment.