Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- app.py +6 -1
- flux1_img2img.py +1 -0
app.py
CHANGED
@@ -117,4 +117,9 @@ with demo_blocks as demo:
|
|
117 |
"""
|
118 |
)
|
119 |
|
120 |
-
|
|
|
|
|
|
|
|
|
|
|
|
117 |
"""
|
118 |
)
|
119 |
|
120 |
+
try:
|
121 |
+
demo_blocks.queue(max_size=25).launch(share=False,debug=True)
|
122 |
+
except Exception as e:
|
123 |
+
print(f"An launch error occurred: {e}")
|
124 |
+
gr.Error(e)
|
125 |
+
|
flux1_img2img.py
CHANGED
@@ -19,6 +19,7 @@ def process_image(image,mask_image,prompt="a person",model_id="black-forest-labs
|
|
19 |
generator = torch.Generator("cuda").manual_seed(seed)
|
20 |
generators.append(generator)
|
21 |
# more parameter see https://huggingface.co/docs/diffusers/api/pipelines/flux#diffusers.FluxInpaintPipeline
|
|
|
22 |
output = pipe(prompt=prompt, image=image,generator=generator,strength=strength
|
23 |
,guidance_scale=0,num_inference_steps=num_inference_steps,max_sequence_length=512)
|
24 |
|
|
|
19 |
generator = torch.Generator("cuda").manual_seed(seed)
|
20 |
generators.append(generator)
|
21 |
# more parameter see https://huggingface.co/docs/diffusers/api/pipelines/flux#diffusers.FluxInpaintPipeline
|
22 |
+
print(prompt)
|
23 |
output = pipe(prompt=prompt, image=image,generator=generator,strength=strength
|
24 |
,guidance_scale=0,num_inference_steps=num_inference_steps,max_sequence_length=512)
|
25 |
|