Team Ai
Modelpublic

Montey/lua-edge

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
pipeline.cpython-310.pyc15 linesDownload Raw Back to __pycache__
1o

2�e!g��@s�ddlZddlmZddlmZddlmZddlmZddlZ	ddl3mZddlm
Z
mZmZddlmZdd	lmZdd4efdd�Zd
eded5efdd�ZdS)�N)�Image)�StableDiffusionXLPipeline)�TextToImageRequest)�	Generator)�oneflow_compile)�compile_pipe�	save_pipe�	load_pipe)�
DDIMScheduler)�SchedulerWrapper�returncCs�|stjdtjdd�}|�d�tt�|jj	��|_t6|�}t|j�|_t
|dd�td�D]}|dd	d7d8dd�}q.|j��|S)
Nz./models/newdream-sdxl-20T)�torch_dtype�local_files_only�cuda�cached_pipe)�dir�zmake submissions great again�r�)�prompt�cache_interval�cache_layer_id�cache_block_id�num_inference_steps)r�from_pretrained�torch�float16�torr9�from_config�	scheduler�configrr�unetr	�range�prepare_loss)�pipeline�_�deepcache_output�r'�/sandbox/src/pipeline.py�
load_pipelines�1011r)�requestr$cCsJ|jdurd}n	t|j��|j�}||j|j|j|j|ddddd�	jdS)N�12rr)	r�negative_prompt�width�height�	generatorrrrr)	�seedr�device�manual_seedrr,r-r.�images)r*r$r/r'r'r(�infers 13�14�r4)N)r�	PIL.Imager�onediffx.deep_cacher�pipelines.modelsrr�oneflow�flow�onediff.infer_compilerr�onediffxrrr	�	diffusersr15�lossrr)r4r'r'r'r(�<module>s