TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
720 B

from modelscope.pipelines import pipeline
from modelscope.outputs import OutputKeys
from PIL import Image
from background_generation import modelscope_warpper
model = "damo/cv_background_generation_sd"
pipe = pipeline('background_generation_task', model=model, device='gpu', auto_collate=False, model_revision='v1.1.0')
out = pipe(
'https://vision-poster.oss-cn-shanghai.aliyuncs.com/lllcho.lc/data/test_data/demo_example/%E5%8C%96%E5%A6%86%E5%93%81/1c33fc5e8b084269ffdb4e0557c2c3c4.png',
'https://vision-poster.oss-cn-shanghai.aliyuncs.com/lllcho.lc/data/test_data/5d873b5f64b82bcbb235748347602dce38c6ec1d.jpg',
num_inference_steps=20,
num_images_per_prompt=2,
seed=None,
noise_level=500
)