mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Automatically fill AI model box with models loaded from txt
This commit is contained in:
33
Code/Form1.Designer.cs
generated
33
Code/Form1.Designer.cs
generated
@@ -80,7 +80,6 @@
|
||||
this.queueBtn = new HTAlt.WinForms.HTButton();
|
||||
this.pictureBox4 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox3 = new System.Windows.Forms.PictureBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.info1 = new System.Windows.Forms.PictureBox();
|
||||
this.panel4 = new System.Windows.Forms.Panel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
@@ -90,6 +89,7 @@
|
||||
this.paypalBtn = new HTAlt.WinForms.HTButton();
|
||||
this.discordBtn = new HTAlt.WinForms.HTButton();
|
||||
this.installerBtn = new HTAlt.WinForms.HTButton();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.longProgBar = new HTAlt.WinForms.HTProgressBar();
|
||||
this.cancelBtn = new System.Windows.Forms.Button();
|
||||
this.mainTabControl = new HTAlt.WinForms.HTTabControl();
|
||||
@@ -121,8 +121,8 @@
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.info1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.mainTabControl.SuspendLayout();
|
||||
this.welcomeTab.SuspendLayout();
|
||||
this.panel8.SuspendLayout();
|
||||
@@ -154,14 +154,9 @@
|
||||
this.aiModel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.aiModel.ForeColor = System.Drawing.Color.White;
|
||||
this.aiModel.FormattingEnabled = true;
|
||||
this.aiModel.Items.AddRange(new object[] {
|
||||
"RIFE 1.5 - Optimized for general content",
|
||||
"RIFE 1.6 - Optimized for general and UHD content",
|
||||
"RIFE 1.7 - Optimized for 2D animation (Recommended)",
|
||||
"RIFE 1.8 - Optimized for 2D animation and general content"});
|
||||
this.aiModel.Location = new System.Drawing.Point(281, 127);
|
||||
this.aiModel.Name = "aiModel";
|
||||
this.aiModel.Size = new System.Drawing.Size(200, 23);
|
||||
this.aiModel.Size = new System.Drawing.Size(400, 23);
|
||||
this.aiModel.TabIndex = 25;
|
||||
//
|
||||
// aiCombox
|
||||
@@ -744,16 +739,6 @@
|
||||
this.pictureBox3.TabStop = false;
|
||||
this.toolTip1.SetToolTip(this.pictureBox3, "Supports drag-n-drop.\r\nGets auto-assigned whenever you set an input file.");
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackgroundImage = global::Flowframes.Properties.Resources.questmark_72px_bordeer;
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(66, 128);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(29, 21);
|
||||
this.pictureBox1.TabIndex = 28;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// info1
|
||||
//
|
||||
this.info1.BackgroundImage = global::Flowframes.Properties.Resources.questmark_72px_bordeer;
|
||||
@@ -887,6 +872,16 @@
|
||||
this.installerBtn.Visible = false;
|
||||
this.installerBtn.Click += new System.EventHandler(this.installerBtn_Click);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.BackgroundImage = global::Flowframes.Properties.Resources.questmark_72px_bordeer;
|
||||
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(66, 128);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(29, 21);
|
||||
this.pictureBox1.TabIndex = 28;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// longProgBar
|
||||
//
|
||||
this.longProgBar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
@@ -1349,8 +1344,8 @@
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.info1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.mainTabControl.ResumeLayout(false);
|
||||
this.welcomeTab.ResumeLayout(false);
|
||||
this.welcomeTab.PerformLayout();
|
||||
|
||||
@@ -250,6 +250,7 @@ namespace Flowframes
|
||||
|
||||
private void aiCombox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
aiModel = UIUtils.FillAiModelsCombox(aiModel, GetAi());
|
||||
interpFactorCombox_SelectedIndexChanged(null, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Flowframes.IO;
|
||||
using Flowframes.Data;
|
||||
using Flowframes.IO;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -32,5 +33,31 @@ namespace Flowframes.UI
|
||||
box.SelectedIndex = index;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static ComboBox FillAiModelsCombox (ComboBox combox, AI ai)
|
||||
{
|
||||
string pkgPath = PkgUtils.GetPkgFolder(ai.pkg);
|
||||
string modelsFile = Path.Combine(pkgPath, "models.txt");
|
||||
string[] modelsWithDec = IOUtils.ReadLines(modelsFile);
|
||||
combox.Items.Clear();
|
||||
|
||||
for (int i = 0; i < modelsWithDec.Length; i++)
|
||||
{
|
||||
string model = modelsWithDec[i];
|
||||
|
||||
if (string.IsNullOrWhiteSpace(model))
|
||||
continue;
|
||||
|
||||
combox.Items.Add(model);
|
||||
|
||||
if (model.Contains("Recommended") || model.Contains("Default"))
|
||||
combox.SelectedIndex = i;
|
||||
}
|
||||
|
||||
if(combox.SelectedIndex < 0)
|
||||
combox.SelectedIndex = 0;
|
||||
|
||||
return combox;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
pkgs/rife-cuda/models.txt
Normal file
4
pkgs/rife-cuda/models.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
RIFE 1.5 - Optimized for general content
|
||||
RIFE 1.6 - Optimized for general and UHD content
|
||||
RIFE 1.7 - Optimized for 2D animation (Recommended)
|
||||
RIFE 1.8 - Optimized for 2D animation and general content
|
||||
3
pkgs/rife-ncnn/models.txt
Normal file
3
pkgs/rife-ncnn/models.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
RIFE 1.5 - Optimized for general content
|
||||
RIFE 1.6 - Optimized for general and UHD content
|
||||
RIFE 1.7 - Optimized for 2D animation (Recommended)
|
||||
Reference in New Issue
Block a user