ACMX 2.136.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
deep-dream-settings.hpp
Go to the documentation of this file.
1#ifndef DEEP_DREAM_SETTINGS_HPP
2#define DEEP_DREAM_SETTINGS_HPP
3
4#include <QDialog>
5#include <QString>
6
7class QCheckBox;
8class QComboBox;
9class QDoubleSpinBox;
10class QLabel;
11class QLineEdit;
12class QPushButton;
13class QSpinBox;
14
16 bool enabled = false;
17 QString model_file;
18 QString layer = "relu4_2";
19 int iterations = 1;
20 double strength = 0.05;
21 double feedback = 0.9;
22 double zoom = 1.01;
23 double rotation = 0.1;
25 bool fp16 = false;
26 int channel = -1;
27 int octaves = 1;
28 double octave_scale = 1.4;
29 int jitter = 0;
30 int smoothing = 0;
31 bool gpu_filter_first = false;
32 bool deep_original = false;
33};
34
35class DeepDreamSettingsDialog : public QDialog {
36 Q_OBJECT
37
38 public:
39 explicit DeepDreamSettingsDialog(bool gpu_filter_enabled,
40 QWidget *parent = nullptr);
41 [[nodiscard]] DeepDreamConfiguration configuration() const;
42
43 signals:
45
46 private slots:
47 void browse_model();
48 void randomize_settings();
49 void apply_settings();
50 void accept_settings();
51
52 private:
53 [[nodiscard]] bool validate_settings();
55 void load_ui_state();
56 void save_ui_state();
58 void refresh_model_metadata(bool report_error);
59
61 QCheckBox *enable_check_box = nullptr;
62 QLineEdit *model_file_edit = nullptr;
63 QPushButton *browse_model_button = nullptr;
64 QLabel *model_metadata_label = nullptr;
65 QComboBox *layer_combo_box = nullptr;
66 QSpinBox *iterations_spin_box = nullptr;
67 QDoubleSpinBox *strength_spin_box = nullptr;
68 QDoubleSpinBox *feedback_spin_box = nullptr;
69 QDoubleSpinBox *zoom_spin_box = nullptr;
70 QDoubleSpinBox *rotation_spin_box = nullptr;
71 QCheckBox *native_size_check_box = nullptr;
72 QSpinBox *maximum_dimension_spin_box = nullptr;
73 QCheckBox *fp16_check_box = nullptr;
74 QSpinBox *channel_spin_box = nullptr;
75 QSpinBox *octaves_spin_box = nullptr;
76 QDoubleSpinBox *octave_scale_spin_box = nullptr;
77 QSpinBox *jitter_spin_box = nullptr;
78 QSpinBox *smoothing_spin_box = nullptr;
79 QCheckBox *gpu_filter_first_check_box = nullptr;
80 QCheckBox *deep_original_check_box = nullptr;
81};
82
83#endif
QDoubleSpinBox * octave_scale_spin_box
DeepDreamConfiguration configuration() const
void refresh_model_metadata(bool report_error)
DeepDreamSettingsDialog(bool gpu_filter_enabled, QWidget *parent=nullptr)