#python#deep_learning#diffusion#flax#flux#hacktoberfest#image_generation#image2image#image2video#jax#latent_diffusion_models#pytorch#score_based_generative_modeling#stable_diffusion#stable_diffusion_diffusers#text2image#text2video#video2video
The Hugging Face Diffusers library is a powerful and easy-to-use tool for generating images, audio, and 3D molecular structures using advanced diffusion models. It offers ready-to-use pretrained models and flexible components like pipelines, schedulers, and model building blocks, allowing you to quickly create or customize your own diffusion-based projects. Installation is simple via pip or conda, and you can generate high-quality outputs with just a few lines of code. This library benefits you by making cutting-edge AI generation accessible, customizable, and efficient, whether you want to run models or train your own[1][2][5].
https://github.com/huggingface/diffusers
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js