Spaces:
Build error
Build error
Update
Browse filesFiles changed (14)
- app_canny.py+3-4
- app_depth.py+3-4
- app_ip2p.py+3-4
- app_lineart.py+3-4
- app_mlsd.py+3-4
- app_normal.py+3-4
- app_openpose.py+3-4
- app_scribble.py+3-4
- app_scribble_interactive.py+3-4
- app_segmentation.py+3-4
- app_shuffle.py+3-4
- app_softedge.py+3-4
- settings.py+4
- utils.py+3-1
2 unmodified lines345678940 unmodified lines505152535455565758592 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn40 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678940 unmodified lines5051525354555657582 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn40 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678939 unmodified lines495051525354555657582 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn39 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678939 unmodified lines4950515253545556572 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn39 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678928 unmodified lines383940414243444546472 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn28 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678928 unmodified lines3839404142434445462 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn28 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678948 unmodified lines585960616263646566672 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn48 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678948 unmodified lines5859606162636465662 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn48 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678946 unmodified lines565758596061626364652 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn46 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678946 unmodified lines5657585960616263642 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn46 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678938 unmodified lines484950515253545556572 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn38 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678938 unmodified lines4849505152535455562 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn38 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678938 unmodified lines484950515253545556572 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn38 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678938 unmodified lines4849505152535455562 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn38 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678939 unmodified lines495051525354555657582 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn39 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678939 unmodified lines4950515253545556572 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn39 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
3 unmodified lines4567891043 unmodified lines545556575859606162633 unmodified linesimport numpy as npfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn43 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(3 unmodified lines4567891043 unmodified lines5455565758596061623 unmodified linesimport numpy as npfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn43 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678938 unmodified lines484950515253545556572 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn38 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678938 unmodified lines4849505152535455562 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn38 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678933 unmodified lines434445464748495051522 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn33 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678933 unmodified lines4344454647484950512 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn33 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
2 unmodified lines345678944 unmodified lines545556575859606162632 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES)from utils import randomize_seed_fn44 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=1000000,step=1,value=0,randomize=True)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(2 unmodified lines345678944 unmodified lines5455565758596061622 unmodified linesimport gradio as grfrom settings import (DEFAULT_IMAGE_RESOLUTION, DEFAULT_NUM_IMAGES,MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES, MAX_SEED)from utils import randomize_seed_fn44 unmodified linesstep=0.1)seed = gr.Slider(label='Seed',minimum=0,maximum=MAX_SEED,step=1,value=0)randomize_seed = gr.Checkbox(label='Randomize seed',value=True)a_prompt = gr.Textbox(
123455 unmodified lines111213import osDEFAULT_MODEL_ID = os.getenv('DEFAULT_MODEL_ID','runwayml/stable-diffusion-v1-5')5 unmodified linesALLOW_CHANGING_BASE_MODEL = os.getenv('SPACE_ID') != 'hysts/ControlNet-v1-1'SHOW_DUPLICATE_BUTTON = os.getenv('SHOW_DUPLICATE_BUTTON') == '1'12345675 unmodified lines1314151617import osimport numpy as npDEFAULT_MODEL_ID = os.getenv('DEFAULT_MODEL_ID','runwayml/stable-diffusion-v1-5')5 unmodified linesALLOW_CHANGING_BASE_MODEL = os.getenv('SPACE_ID') != 'hysts/ControlNet-v1-1'SHOW_DUPLICATE_BUTTON = os.getenv('SHOW_DUPLICATE_BUTTON') == '1'MAX_SEED = np.iinfo(np.int32).max
1234567import randomdef randomize_seed_fn(seed: int, randomize_seed: bool) -> int:if randomize_seed:seed = random.randint(0, 1000000)return seed123456789import randomfrom settings import MAX_SEEDdef randomize_seed_fn(seed: int, randomize_seed: bool) -> int:if randomize_seed:seed = random.randint(0, MAX_SEED)return seed
app_canny.py+3-4
app_depth.py+3-4
app_ip2p.py+3-4
app_lineart.py+3-4
app_mlsd.py+3-4
app_normal.py+3-4
app_openpose.py+3-4
app_scribble.py+3-4
app_scribble_interactive.py+3-4
app_segmentation.py+3-4
app_shuffle.py+3-4
app_softedge.py+3-4
settings.py+4
utils.py+3-1