fffiloni commited on
Commit
f86f2f4
·
verified ·
1 Parent(s): b793232

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -2
app.py CHANGED
@@ -13,6 +13,44 @@ login(token=hf_token)
13
  MAX_SEED = np.iinfo(np.int32).max
14
  MAX_IMAGE_SIZE = 2048
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
17
  pipeline = StableDiffusionXLPipeline.from_pretrained(
18
  "stabilityai/stable-diffusion-xl-base-1.0",
@@ -124,8 +162,16 @@ with gr.Blocks(css=css) as demo:
124
  """)
125
 
126
  with gr.Row():
127
- content_b_lora = gr.Textbox(label="B-LoRa for content")
128
- style_b_lora = gr.Textbox(label="B-LoRa for style")
 
 
 
 
 
 
 
 
129
 
130
  with gr.Column():
131
  load_b_loras_btn = gr.Button("load models")
 
13
  MAX_SEED = np.iinfo(np.int32).max
14
  MAX_IMAGE_SIZE = 2048
15
 
16
+ SAMPLE_MODEL_IDS = [
17
+ 'lora-library/B-LoRA-teddybear',
18
+ 'lora-library/B-LoRA-bull',
19
+ 'lora-library/B-LoRA-wolf_plushie',
20
+ 'lora-library/B-LoRA-pen_sketch',
21
+ 'lora-library/B-LoRA-cartoon_line',
22
+ 'lora-library/B-LoRA-child',
23
+ 'lora-library/B-LoRA-vase',
24
+ 'lora-library/B-LoRA-scary_mug',
25
+ 'lora-library/B-LoRA-statue',
26
+ 'lora-library/B-LoRA-colorful_teapot',
27
+ 'lora-library/B-LoRA-grey_sloth_plushie',
28
+ 'lora-library/B-LoRA-teapot',
29
+ 'lora-library/B-LoRA-backpack_dog',
30
+ 'lora-library/B-LoRA-buddha',
31
+ 'lora-library/B-LoRA-dog6',
32
+ 'lora-library/B-LoRA-poop_emoji',
33
+ 'lora-library/B-LoRA-pot',
34
+ 'lora-library/B-LoRA-fat_bird',
35
+ 'lora-library/B-LoRA-elephant',
36
+ 'lora-library/B-LoRA-metal_bird',
37
+ 'lora-library/B-LoRA-cat',
38
+ 'lora-library/B-LoRA-dog2',
39
+ 'lora-library/B-LoRA-drawing1',
40
+ 'lora-library/B-LoRA-village_oil',
41
+ 'lora-library/B-LoRA-watercolor',
42
+ 'lora-library/B-LoRA-house_3d',
43
+ 'lora-library/B-LoRA-ink_sketch',
44
+ 'lora-library/B-LoRA-drawing3',
45
+ 'lora-library/B-LoRA-crayon_drawing',
46
+ 'lora-library/B-LoRA-kiss',
47
+ 'lora-library/B-LoRA-drawing4',
48
+ 'lora-library/B-LoRA-working_cartoon',
49
+ 'lora-library/B-LoRA-painting',
50
+ 'lora-library/B-LoRA-drawing2'
51
+ 'lora-library/B-LoRA-multi-dog2',
52
+ ]
53
+
54
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
55
  pipeline = StableDiffusionXLPipeline.from_pretrained(
56
  "stabilityai/stable-diffusion-xl-base-1.0",
 
162
  """)
163
 
164
  with gr.Row():
165
+ content_b_lora = gr.Dropdown(
166
+ label="B-LoRa for content",
167
+ allow_custom_value=True,
168
+ choices=SAMPLE_MODEL_IDS
169
+ )
170
+ style_b_lora = gr.Dropdown(
171
+ label="B-LoRa for style",
172
+ allow_custom_value=True,
173
+ choices=SAMPLE_MODEL_IDS
174
+ )
175
 
176
  with gr.Column():
177
  load_b_loras_btn = gr.Button("load models")