Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -104,10 +104,10 @@ print("Loading Model!")
|
|
104 |
schedule: str = "euler_a"
|
105 |
base_model_path: str = "stabilityai/stable-diffusion-xl-base-1.0"
|
106 |
refiner_model_path: str = "stabilityai/stable-diffusion-xl-refiner-1.0"
|
107 |
-
unet_path: str = "cosmicman/CosmicMan-SDXL"
|
108 |
SCHEDULER = schedule_map[schedule]
|
109 |
scheduler = SCHEDULER.from_pretrained(base_model_path, subfolder="scheduler", torch_dtype=torch.float16)
|
110 |
-
|
111 |
|
112 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
113 |
base_model_path,
|
@@ -193,7 +193,7 @@ with gr.Blocks(theme=gr.themes.Soft(),css="style.css") as demo:
|
|
193 |
inputs=input_prompt,
|
194 |
outputs=result,
|
195 |
fn=generate_image,
|
196 |
-
cache_examples=
|
197 |
)
|
198 |
|
199 |
gr.on(
|
|
|
104 |
schedule: str = "euler_a"
|
105 |
base_model_path: str = "stabilityai/stable-diffusion-xl-base-1.0"
|
106 |
refiner_model_path: str = "stabilityai/stable-diffusion-xl-refiner-1.0"
|
107 |
+
# unet_path: str = "cosmicman/CosmicMan-SDXL"
|
108 |
SCHEDULER = schedule_map[schedule]
|
109 |
scheduler = SCHEDULER.from_pretrained(base_model_path, subfolder="scheduler", torch_dtype=torch.float16)
|
110 |
+
unet = UNet2DConditionModel.from_pretrained(unet_path, torch_dtype=torch.float16)
|
111 |
|
112 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
113 |
base_model_path,
|
|
|
193 |
inputs=input_prompt,
|
194 |
outputs=result,
|
195 |
fn=generate_image,
|
196 |
+
cache_examples=0,
|
197 |
)
|
198 |
|
199 |
gr.on(
|