SearcharxivSearch

arXiv subjects

Cheng Lv

Publications and source records attributed to Cheng Lv.

4 recordsLinked to original sources

Open-Source Acceleration of Stable-Diffusion.cpp Deployable on All Devices

Stable diffusion plays a crucial role in generating high-quality images. However, image generation is time-consuming and memory-intensive. To address this, stable-diffusion.cpp (Sdcpp) emerges as an efficient inference framework to accelerate the diffusion models. Although it is lightweight, the current implementation of ggml_conv_2d operator in Sdcpp is suboptimal, exhibiting both high inference latency and massive memory usage. To address this, in this work, we present an optimized version of Sdcpp leveraging the Winograd algorithm to accelerate 2D convolution operations, which is the primary bottleneck in the pipeline. By analyzing both dependent and independent computation graphs, we exploit the device's locality and parallelism to achieve substantial performance improvements. Our framework delivers correct end-to-end results across various stable diffusion models, including SDv1.4, v1.5, v2.1, SDXL, and SDXL-Turbo. Our evaluation results demonstrate a speedup up to 2.76x for individual convolutional layers and an inference speedup up to 4.79x for the overall image generation process, compared with the original Sdcpp on M1 pro. Homepage: https://github.com/SealAILab/stable-diffusion-cpp

cs.CV

A re-formulization of the transfer matrix method for calculating wave-functions in higher dimensional disordered open systems

We present a numerically stable re-formulization of the transfer matrix method (TMM). The iteration form of the traditional TMM is transformed into solving a set of linear equations. Our method gains the new ability of calculating accurate wave-functions of higher dimensional disordered systems. It also shows higher efficiency than the traditional TMM when treating finite systems. In contrast to the diagonalization method, our method not only provides a new route for calculating the wave-function corresponding to the boundary conditions of open systems in realistic transport experiments, but also has advantages that the calculating wave energy/frequency can be tuned continuously and the efficiency is much higher. Our new method is further used to identify the necklace state in the two dimensional disordered Anderson model, where it shows advantage in cooperating the wave-functions with the continuous transmission spectrum of open systems. The new formulization is very simple to implement and can be readily generalized to various systems such as spin-orbit coupling systems or optical systems.

physics.comp-ph

Far-field super-resolution imaging with a planar hyperbolic metamaterial lens beyond the Fabry-Perot resonance condition

We demonstrate achieving the far-field super-resolution imaging can be realized by using a planar hyperbolic metamaterial lens (PHML), beyond the Fabry-Perot resonance condition. Although the thickness of the PHML is much larger than wavelength, the PHML not only can transmit radiative waves and evanescent waves with high transmission, but also can collect all the waves in the image region with the amplitudes of them being the same order of magnitude. We present a design for a PHML to realize the far-field super-resolution imaging, with the distance between the sources and the images 10 times larger than wavelength. We show the superresolution of our PHML is robust against losses, and the PHML can be fabricated by periodic stacking of metal and dielectric layers.

physics.optics

Transition Path, Quasi-potential Energy Landscape and Stability of Genetic Switches

One of the fundamental cellular processes governed by genetic regulatory networks in cells is the transition among different states under the intrinsic and extrinsic noise. Based on a two-state genetic switching model with positive feedback, we develop a framework to understand the metastability in gene expressions. This framework is comprised of identifying the transition path, reconstructing the global quasi-potential energy landscape, analyzing the uphill and downhill transition paths, etc. It is successfully utilized to investigate the stability of genetic switching models and fluctuation properties in different regimes of gene expression with positive feedback. The quasi-potential energy landscape, which is the rationalized version of Waddington potential, provides a quantitative tool to understand the metastability in more general biological processes with intrinsic noise.

q-bio.MN